nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchFromGitHub, rustPlatform }:
2
3rustPlatform.buildRustPackage rec {
4 name = "fd-${version}";
5 version = "7.3.0";
6
7 src = fetchFromGitHub {
8 owner = "sharkdp";
9 repo = "fd";
10 rev = "v${version}";
11 sha256 = "0y4657w1pi4x9nmbv551dj00dyiv935m8ph7jlv00chwy3hrb3yi";
12 };
13
14 cargoSha256 = "0dfv6nia3v3f3rwbjh2h3zdqd48vw8gwilhq0z4n6xvjzk7qydj5";
15
16 preFixup = ''
17 install -Dm644 "$src/doc/fd.1" "$out/man/man1/fd.1"
18
19 install -Dm644 target/release/build/fd-find-*/out/fd.bash \
20 "$out/share/bash-completion/completions/fd.bash"
21 install -Dm644 target/release/build/fd-find-*/out/fd.fish \
22 "$out/share/fish/vendor_completions.d/fd.fish"
23 install -Dm644 target/release/build/fd-find-*/out/_fd \
24 "$out/share/zsh/site-functions/_fd"
25 '';
26
27 meta = with stdenv.lib; {
28 description = "A simple, fast and user-friendly alternative to find";
29 longDescription = ''
30 `fd` is a simple, fast and user-friendly alternative to `find`.
31
32 While it does not seek to mirror all of `find`'s powerful functionality,
33 it provides sensible (opinionated) defaults for 80% of the use cases.
34 '';
35 homepage = "https://github.com/sharkdp/fd";
36 license = with licenses; [ asl20 /* or */ mit ];
37 maintainers = with maintainers; [ dywedir ];
38 platforms = platforms.all;
39 };
40}