1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-13 16:15:30 +00:00
nixpkgs/pkgs/tools/misc/fd/default.nix
2018-03-26 14:31:01 +02:00

40 lines
1.3 KiB
Nix

{ stdenv, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
name = "fd-${version}";
version = "7.0.0";
src = fetchFromGitHub {
owner = "sharkdp";
repo = "fd";
rev = "v${version}";
sha256 = "0qykzkwrj4w3i5h1a328kadd7fgd91w0z2n4xr6i3csyaiwwgd1x";
};
cargoSha256 = "1qicgfaqzjm7sjzgxkci6bg495n227pyicj4ycds5z6mfy15hi4q";
preFixup = ''
mkdir -p "$out/man/man1"
cp "$src/doc/fd.1" "$out/man/man1"
mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
cp target/release/build/fd-find-*/out/fd.bash "$out/share/bash-completion/completions/"
cp target/release/build/fd-find-*/out/fd.fish "$out/share/fish/vendor_completions.d/"
cp target/release/build/fd-find-*/out/_fd "$out/share/zsh/site-functions/"
'';
meta = with stdenv.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 ];
platforms = platforms.all;
};
}