From 89b069016704eb95da4f99fa68fad83859d7b128 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 15 Mar 2020 15:21:50 +0800 Subject: [PATCH] navi: bump version --- pkgs/navi/default.nix | 20 ++++++++++---------- system/all/packages.nix | 7 +++---- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pkgs/navi/default.nix b/pkgs/navi/default.nix index 3cb69d0..71cb1c2 100644 --- a/pkgs/navi/default.nix +++ b/pkgs/navi/default.nix @@ -1,17 +1,15 @@ -{ rustPlatform, fetchFromGitHub, stdenv, fzf, makeWrapper, ... }: +{ rustPlatform, fetchFromGitHub, stdenv, fzf, makeWrapper }: rustPlatform.buildRustPackage rec { - - name = "navi-${version}"; - - version = "e99e1511e50a2706f0eea3286df94b6373acf8b0"; + pname = "navi"; + version = "48c2b64f7f184dc351d04d2fe2bda1b2313b8d79"; src = fetchFromGitHub { owner = "denisidoro"; repo = "navi"; # rev = "v${version}"; rev = "${version}"; - sha256 = "07pfyvbzy62i5ncxgwcdim1pl5nfis3b8a2vkvjdvz167kx99xhg"; + sha256 = "1y7mfai7a0hwzq7kw997w0jwjpzqr2wcfr66jxf60k2jpbf4bk8h"; }; cargoSha256 = "18d3b9g2jxkgscx9186v5301y4y01wd00kcs14617fgjnv0lyz1g"; @@ -19,19 +17,21 @@ rustPlatform.buildRustPackage rec { postInstall = '' mkdir -p $out/share/navi/ - cp -r ./cheats $out/share/navi/ + mv cheats $out/share/navi/ + mv shell $out/share/navi/ + wrapProgram "$out/bin/navi" \ --suffix "PATH" : "${fzf}/bin" \ --suffix "NAVI_PATH" : "$out/share/navi/cheats" ''; - buildInputs = [ fzf makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; + meta = with stdenv.lib; { description = "An interactive cheatsheet tool for the command-line"; homepage = "https://github.com/denisidoro/navi"; license = licenses.asl20; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ mrVanDalo ]; }; } - diff --git a/system/all/packages.nix b/system/all/packages.nix index 535ed43..9f6efda 100644 --- a/system/all/packages.nix +++ b/system/all/packages.nix @@ -85,10 +85,6 @@ in { duc - #(pkgs.writers.writeBashBin "navi" '' - # set -eu -o pipefail - # navi --path "$HOME/.cheats:${pkgs.navi}/share/navi/cheats" "$@" - #'') navi memoryUsage @@ -109,6 +105,9 @@ in { # configure navi environment.variables.NAVI_PATH = "$HOME/.cheats"; + programs.zsh.loginShellInit = "source ${pkgs.navi}/shell/navi.plugins.zsh"; + programs.bash.loginShellInit = "source ${pkgs.navi}/shell/navi.plugins.bash"; + programs.fish.loginShellInit = "source ${pkgs.navi}/shell/navi.plugins.fish"; }