about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/broot/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-01-22 15:26:58 +0000
committerAlyssa Ross <hi@alyssa.is>2020-01-22 16:56:33 +0000
commit542f80867c380b0ac79250b6e5358dda8bc49e0d (patch)
treeaa5903f228b2f32c524a9a6e4f6dd94f8c5b869e /nixpkgs/pkgs/tools/misc/broot/default.nix
parentf69898c7d5b757342e6ab90d5fcc7c9aea9f5ff4 (diff)
parent90441b4b47fc7280de6a5bd1a228017caaa0f97f (diff)
downloadnixlib-542f80867c380b0ac79250b6e5358dda8bc49e0d.tar
nixlib-542f80867c380b0ac79250b6e5358dda8bc49e0d.tar.gz
nixlib-542f80867c380b0ac79250b6e5358dda8bc49e0d.tar.bz2
nixlib-542f80867c380b0ac79250b6e5358dda8bc49e0d.tar.lz
nixlib-542f80867c380b0ac79250b6e5358dda8bc49e0d.tar.xz
nixlib-542f80867c380b0ac79250b6e5358dda8bc49e0d.tar.zst
nixlib-542f80867c380b0ac79250b6e5358dda8bc49e0d.zip
Merge commit '90441b4b47fc7280de6a5bd1a228017caaa0f97f'
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/broot/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/broot/default.nix24
1 files changed, 20 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/tools/misc/broot/default.nix b/nixpkgs/pkgs/tools/misc/broot/default.nix
index 63d5ff69e790..bca0f8099091 100644
--- a/nixpkgs/pkgs/tools/misc/broot/default.nix
+++ b/nixpkgs/pkgs/tools/misc/broot/default.nix
@@ -1,17 +1,33 @@
-{ stdenv, rustPlatform, fetchFromGitHub }:
+{ stdenv, rustPlatform, fetchFromGitHub, coreutils, installShellFiles }:
 
 rustPlatform.buildRustPackage rec {
   pname = "broot";
-  version = "0.10.2";
+  version = "0.11.9";
 
   src = fetchFromGitHub {
     owner = "Canop";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1wisqb4cqdgsnjvmpgxbzs9zcw6npqw1kqxxs8mn33sxlikhbf2l";
+    sha256 = "1kif1113qdxg4hr1mfgg1fh10zgl9cl117cm1bfjaabw11k75cvj";
   };
 
-  cargoSha256 = "09gnyj97akychin1axp9kcww3c04xx7x1qnplhs2yxfki62r4y2b";
+  cargoSha256 = "0636qkgkw027s5dz2mryhghlm6kn3s7cfy4i8rxywr8r3w8c40y0";
+  verifyCargoDeps = true;
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postPatch = ''
+    substituteInPlace src/verb_store.rs --replace '"/bin/' '"${coreutils}/bin/'
+  '';
+
+  postInstall = ''
+    # install shell completion files
+    OUT_DIR=target/release/build/broot-*/out
+
+    installShellCompletion --bash $OUT_DIR/{br,broot}.bash
+    installShellCompletion --fish $OUT_DIR/{br,broot}.fish
+    installShellCompletion --zsh $OUT_DIR/{_br,_broot}
+  '';
 
   meta = with stdenv.lib; {
     description = "An interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands";