nixpkgs-suyu/pkgs/tools/misc/fd/default.nix

40 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
name = "fd-${version}";
2018-03-26 13:44:32 +02:00
version = "7.0.0";
src = fetchFromGitHub {
owner = "sharkdp";
repo = "fd";
rev = "v${version}";
2018-03-26 13:44:32 +02:00
sha256 = "0qykzkwrj4w3i5h1a328kadd7fgd91w0z2n4xr6i3csyaiwwgd1x";
};
2018-03-26 13:44:32 +02:00
cargoSha256 = "1qicgfaqzjm7sjzgxkci6bg495n227pyicj4ycds5z6mfy15hi4q";
2017-10-26 23:08:49 +02:00
preFixup = ''
mkdir -p "$out/man/man1"
cp "$src/doc/fd.1" "$out/man/man1"
2017-11-16 10:58:32 +01:00
2018-02-13 11:51:02 +01:00
mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
2017-12-11 14:20:23 +01:00
cp target/release/build/fd-find-*/out/fd.bash "$out/share/bash-completion/completions/"
2018-02-13 11:51:02 +01:00
cp target/release/build/fd-find-*/out/fd.fish "$out/share/fish/vendor_completions.d/"
2017-11-16 10:58:32 +01:00
cp target/release/build/fd-find-*/out/_fd "$out/share/zsh/site-functions/"
2017-10-26 23:08:49 +02:00
'';
meta = with stdenv.lib; {
description = "A simple, fast and user-friendly alternative to find";
longDescription = ''
`fd` is a simple, fast and user-friendly alternative to `find`.
While it does not seek to mirror all of `find`'s powerful functionality,
it provides sensible (opinionated) defaults for 80% of the use cases.
'';
homepage = "https://github.com/sharkdp/fd";
2017-10-26 23:08:49 +02:00
license = with licenses; [ asl20 /* or */ mit ];
2018-02-10 20:55:03 +01:00
maintainers = with maintainers; [ dywedir ];
2017-10-26 23:08:49 +02:00
platforms = platforms.all;
};
}