about summary refs log tree commit diff
path: root/pkgs/tools/misc/fd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/fd/default.nix')
-rw-r--r--pkgs/tools/misc/fd/default.nix25
1 files changed, 12 insertions, 13 deletions
diff --git a/pkgs/tools/misc/fd/default.nix b/pkgs/tools/misc/fd/default.nix
index 3136381dd8eb..060e1c3fcdf6 100644
--- a/pkgs/tools/misc/fd/default.nix
+++ b/pkgs/tools/misc/fd/default.nix
@@ -1,30 +1,29 @@
-{ stdenv, fetchFromGitHub, rustPlatform }:
+{ lib, fetchFromGitHub, rustPlatform, installShellFiles }:
 
 rustPlatform.buildRustPackage rec {
   pname = "fd";
-  version = "7.4.0";
+  version = "7.5.0";
 
   src = fetchFromGitHub {
     owner = "sharkdp";
     repo = "fd";
     rev = "v${version}";
-    sha256 = "108p1p9bxhg4qzwfs6wqcakcvlpqw3w498jkz1vhmg6jp1mbmgdr";
+    sha256 = "029xr7l751dy167hfzrd030llkaiy8j585h1d4l6391fgrsvnav7";
   };
 
-  cargoSha256 = "1nhlarrl0m6as3j2547yf1xxjm88qy3v8jgvhd47z3f5s63bb6w5";
+  cargoSha256 = "0lq6da2f6xywyhzyyrpph96d8b9vpdzakzipci167g6hhh232b5b";
+
+  nativeBuildInputs = [ installShellFiles ];
 
   preFixup = ''
-    install -Dm644 "$src/doc/fd.1" "$out/man/man1/fd.1"
-
-    install -Dm644 target/release/build/fd-find-*/out/fd.bash \
-      "$out/share/bash-completion/completions/fd.bash"
-    install -Dm644 target/release/build/fd-find-*/out/fd.fish \
-      "$out/share/fish/vendor_completions.d/fd.fish"
-    install -Dm644 target/release/build/fd-find-*/out/_fd \
-      "$out/share/zsh/site-functions/_fd"
+    installManPage "$src/doc/fd.1"
+
+    (cd target/release/build/fd-find-*/out
+    installShellCompletion fd.{bash,fish}
+    installShellCompletion --zsh _fd)
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A simple, fast and user-friendly alternative to find";
     longDescription = ''
       `fd` is a simple, fast and user-friendly alternative to `find`.