nixpkgs/pkgs/tools/misc/fd/default.nix
2022-12-10 18:01:48 +00:00

40 lines
1.2 KiB
Nix

{ lib, fetchFromGitHub, rustPlatform, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "fd";
version = "8.6.0";
src = fetchFromGitHub {
owner = "sharkdp";
repo = "fd";
rev = "v${version}";
sha256 = "sha256-RVGCSUYyWo2wKRIrnci+aWEAPW9jHhMfYkYJkCgd7f8=";
};
cargoSha256 = "sha256-PT95U1l+BVX7sby3GKktZMmbNNQoPYR8nL+H90EnqZY=";
auditable = true; # TODO: remove when this is the default
nativeBuildInputs = [ installShellFiles ];
preFixup = ''
installManPage doc/fd.1
installShellCompletion $releaseDir/build/fd-find-*/out/fd.{bash,fish}
installShellCompletion --zsh contrib/completion/_fd
'';
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";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ dywedir globin ma27 zowoq ];
};
}