diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-03-19 11:43:22 +1000 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-03-18 20:07:38 -0700 |
commit | 0e886b69ab790c6c941c248faef50ba11da73134 (patch) | |
tree | 7055cfb871acf1b84448e0fe601e4fd3aeccb4a9 /pkgs/tools/misc/fd | |
parent | b4cf1c96faa60afaeea477dfff95f50ad08bf5f8 (diff) |
fd: use installShellFiles
Diffstat (limited to 'pkgs/tools/misc/fd')
-rw-r--r-- | pkgs/tools/misc/fd/default.nix | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/pkgs/tools/misc/fd/default.nix b/pkgs/tools/misc/fd/default.nix index 3136381dd8ebb..3dfe7c80a5a52 100644 --- a/pkgs/tools/misc/fd/default.nix +++ b/pkgs/tools/misc/fd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform }: +{ lib, fetchFromGitHub, rustPlatform, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "fd"; @@ -13,18 +13,17 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1nhlarrl0m6as3j2547yf1xxjm88qy3v8jgvhd47z3f5s63bb6w5"; + 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`. |