2017-07-31 00:21:36 +01:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "fd";
|
2019-09-15 22:28:10 +01:00
|
|
|
version = "7.4.0";
|
2017-07-31 00:21:36 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sharkdp";
|
|
|
|
repo = "fd";
|
|
|
|
rev = "v${version}";
|
2019-09-15 22:28:10 +01:00
|
|
|
sha256 = "108p1p9bxhg4qzwfs6wqcakcvlpqw3w498jkz1vhmg6jp1mbmgdr";
|
2017-07-31 00:21:36 +01:00
|
|
|
};
|
|
|
|
|
2019-09-15 22:28:10 +01:00
|
|
|
cargoSha256 = "0ylanxcb1vrhvm9h3lvq8nh28362wi5hjy0pqdv5lh40pphcknnz";
|
2017-07-31 00:21:36 +01:00
|
|
|
|
2017-10-26 22:08:49 +01:00
|
|
|
preFixup = ''
|
2019-02-13 20:45:31 +00:00
|
|
|
install -Dm644 "$src/doc/fd.1" "$out/man/man1/fd.1"
|
2017-11-16 09:58:32 +00:00
|
|
|
|
2019-02-13 20:45:31 +00:00
|
|
|
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"
|
2017-10-26 22:08:49 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-07-31 00:21:36 +01:00
|
|
|
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 22:08:49 +01:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2019-08-20 18:36:05 +01:00
|
|
|
maintainers = with maintainers; [ dywedir globin ];
|
2017-10-26 22:08:49 +01:00
|
|
|
platforms = platforms.all;
|
2017-07-31 00:21:36 +01:00
|
|
|
};
|
|
|
|
}
|