2017-07-31 00:21:36 +01:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
name = "fd-${version}";
|
2018-01-03 17:19:27 +00:00
|
|
|
version = "6.2.0";
|
2017-07-31 00:21:36 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sharkdp";
|
|
|
|
repo = "fd";
|
|
|
|
rev = "v${version}";
|
2018-01-03 17:19:27 +00:00
|
|
|
sha256 = "1l1p7jlrryd54jwwrwgvs4njr3r59m8xsh31z7db0bzpw3dk7n5k";
|
2017-07-31 00:21:36 +01:00
|
|
|
};
|
|
|
|
|
2018-01-03 17:19:27 +00:00
|
|
|
cargoSha256 = "1dikix9d46f0ydi81ray2vdvsy6y326w8ql6c89zx0p9cjm8m83r";
|
2017-07-31 00:21:36 +01:00
|
|
|
|
2017-10-26 22:08:49 +01:00
|
|
|
preFixup = ''
|
|
|
|
mkdir -p "$out/man/man1"
|
|
|
|
cp "$src/doc/fd.1" "$out/man/man1"
|
2017-11-16 09:58:32 +00:00
|
|
|
|
|
|
|
mkdir -p "$out/share/"{bash-completion/completions,fish/completions,zsh/site-functions}
|
2017-12-11 13:20:23 +00:00
|
|
|
cp target/release/build/fd-find-*/out/fd.bash "$out/share/bash-completion/completions/"
|
2017-11-16 09:58:32 +00:00
|
|
|
cp target/release/build/fd-find-*/out/fd.fish "$out/share/fish/completions/"
|
|
|
|
cp target/release/build/fd-find-*/out/_fd "$out/share/zsh/site-functions/"
|
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 ];
|
|
|
|
platforms = platforms.all;
|
2017-07-31 00:21:36 +01:00
|
|
|
};
|
|
|
|
}
|