1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/pkgs/tools/misc/broot/default.nix
2020-06-26 13:50:19 -04:00

41 lines
1.2 KiB
Nix

{ stdenv, rustPlatform, fetchFromGitHub, coreutils, libiconv, Security, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "broot";
version = "0.18.0";
src = fetchFromGitHub {
owner = "Canop";
repo = pname;
rev = "v${version}";
sha256 = "0b2hggm2ckdzl9f2dn64gdyvd7flpq3szmx69k84f3fimabn7yrm";
};
cargoSha256 = "1bl2y7h72vwi2jvnszd8vna4yc71s9n6kgmlq4ib2cjmzsppqdpa";
nativeBuildInputs = [ installShellFiles ];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
postPatch = ''
substituteInPlace src/verb/builtin.rs --replace '"/bin/' '"${coreutils}/bin/'
'';
postInstall = ''
# install shell completion files
OUT_DIR=$releaseDir/build/broot-*/out
installShellCompletion --bash $OUT_DIR/{br,broot}.bash
installShellCompletion --fish $OUT_DIR/{br,broot}.fish
installShellCompletion --zsh $OUT_DIR/{_br,_broot}
'';
meta = with stdenv.lib; {
description = "An interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands";
homepage = "https://dystroy.org/broot/";
maintainers = with maintainers; [ magnetophon ];
license = with licenses; [ mit ];
platforms = platforms.all;
};
}