16 rustPlatform.buildRustPackage rec {
21 inherit pname version;
22 sha256 = "sha256-5R5pGCn4CJU2kGPiu6PpUBxr0/02hOwN1ikns2pvGA0=";
25 cargoHash = "sha256-0d7EMWc/PU9kDgfTVc1SWYYym9UEULwR1X3qIW+zvjM=";
33 buildInputs = [ libgit2 oniguruma xorg.libxcb ] ++ lib.optionals stdenv.isDarwin [
39 RUSTONIG_SYSTEM_LIBONIG = true;
42 # Fill the version stub in the man page. We can't fill the date
44 substitute man/page man/broot.1 \
45 --replace "#version" "${version}"
49 # Do not nag users about installing shell integration, since
51 wrapProgram $out/bin/broot \
54 # Install shell function for bash.
55 $out/bin/broot --print-shell-function bash > br.bash
56 install -Dm0444 -t $out/etc/profile.d br.bash
58 # Install shell function for zsh.
59 $out/bin/broot --print-shell-function zsh > br.zsh
60 install -Dm0444 br.zsh $out/share/zsh/site-functions/br
62 # Install shell function for fish
63 $out/bin/broot --print-shell-function fish > br.fish
64 install -Dm0444 -t $out/share/fish/vendor_functions.d br.fish
66 # install shell completion files
67 OUT_DIR=$releaseDir/build/broot-*/out
69 installShellCompletion --bash $OUT_DIR/{br,broot}.bash
70 installShellCompletion --fish $OUT_DIR/{br,broot}.fish
71 installShellCompletion --zsh $OUT_DIR/{_br,_broot}
73 installManPage man/broot.1
76 doInstallCheck = true;
77 installCheckPhase = ''
78 $out/bin/broot --version | grep "${version}"
82 description = "An interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands";
83 homepage = "https://dystroy.org/broot/";
84 changelog = "https://github.com/Canop/broot/releases/tag/v${version}";
85 maintainers = with maintainers; [ dywedir ];
86 license = with licenses; [ mit ];