2023-11-16 04:20:00 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, rust-jemalloc-sys, testers, fd }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "fd";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "8.7.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sharkdp";
|
|
|
|
repo = "fd";
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-euQiMVPKE1/YG04VKMFUA27OtoGENNhqeE0iiF/X7uc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cargoHash = "sha256-doeZTjFPXmxIPYX3IBtetePoNkIHnl6oPJFtXD1tgZY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
buildInputs = [ rust-jemalloc-sys ];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
# skip flaky test
|
|
|
|
checkFlags = [
|
|
|
|
"--skip=test_owner_current_group"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
installManPage doc/fd.1
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
installShellCompletion --cmd fd \
|
|
|
|
--bash <($out/bin/fd --gen-completions bash) \
|
|
|
|
--fish <($out/bin/fd --gen-completions fish)
|
2020-12-07 07:45:13 +00:00
|
|
|
installShellCompletion --zsh contrib/completion/_fd
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = fd;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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`.
|
|
|
|
|
|
|
|
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";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/sharkdp/fd/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2022-12-17 10:02:37 +00:00
|
|
|
maintainers = with maintainers; [ dywedir figsoda globin ma27 zowoq ];
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "fd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|