2020-03-19 01:43:22 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform, installShellFiles }:
|
2017-07-31 00:21:36 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "fd";
|
2020-04-16 10:21:43 +01:00
|
|
|
version = "8.0.0";
|
2017-07-31 00:21:36 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sharkdp";
|
|
|
|
repo = "fd";
|
|
|
|
rev = "v${version}";
|
2020-04-16 10:21:43 +01:00
|
|
|
sha256 = "0l18xavkj99cydp1dqrph00yq2px339zs6jcim59iq3zln1yn0n7";
|
2017-07-31 00:21:36 +01:00
|
|
|
};
|
|
|
|
|
2020-04-16 10:21:43 +01:00
|
|
|
cargoSha256 = "1sdwbnncs1d45x1iqk3jv3r69fpkzrsxm4kjn89jmvd5nk8blvs2";
|
2017-07-31 00:21:36 +01:00
|
|
|
|
2020-03-19 01:43:22 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2017-10-26 22:08:49 +01:00
|
|
|
preFixup = ''
|
2020-03-19 01:43:22 +00:00
|
|
|
installManPage "$src/doc/fd.1"
|
|
|
|
|
2020-03-20 06:46:50 +00:00
|
|
|
installShellCompletion $releaseDir/build/fd-find-*/out/fd.{bash,fish}
|
|
|
|
installShellCompletion --zsh $releaseDir/build/fd-find-*/out/_fd
|
2017-10-26 22:08:49 +01:00
|
|
|
'';
|
|
|
|
|
2020-03-19 01:43:22 +00:00
|
|
|
meta = with 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 ];
|
2020-02-28 02:46:23 +00:00
|
|
|
maintainers = with maintainers; [ dywedir globin ma27 ];
|
2017-10-26 22:08:49 +01:00
|
|
|
platforms = platforms.all;
|
2017-07-31 00:21:36 +01:00
|
|
|
};
|
|
|
|
}
|