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

39 lines
1.1 KiB
Nix
Raw Normal View History

2020-03-19 04:43:22 +03:00
{ lib, fetchFromGitHub, rustPlatform, installShellFiles }:
rustPlatform.buildRustPackage rec {
2019-08-31 14:41:23 +03:00
pname = "fd";
version = "8.1.0";
src = fetchFromGitHub {
owner = "sharkdp";
repo = "fd";
rev = "v${version}";
sha256 = "0zp9bsa0kmg1rsvnxf93d2fnib0cyla0wxpd3sn9kmz20b0vblvn";
};
cargoSha256 = "17fnf61q32a0ljjna3lb0bafwhsll4zgwfwbcqh2ah5gfk1pwc92";
2020-03-19 04:43:22 +03:00
nativeBuildInputs = [ installShellFiles ];
2017-10-27 00:08:49 +03:00
preFixup = ''
2020-03-19 04:43:22 +03:00
installManPage "$src/doc/fd.1"
2020-03-20 09:46:50 +03:00
installShellCompletion $releaseDir/build/fd-find-*/out/fd.{bash,fish}
installShellCompletion --zsh $releaseDir/build/fd-find-*/out/_fd
2017-10-27 00:08:49 +03:00
'';
2020-03-19 04:43:22 +03: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";
2017-10-27 00:08:49 +03:00
license = with licenses; [ asl20 /* or */ mit ];
2020-02-28 05:46:23 +03:00
maintainers = with maintainers; [ dywedir globin ma27 ];
2017-10-27 00:08:49 +03:00
platforms = platforms.all;
};
}