broot: install newly-added shell completions
- add installShellFiles dependency
This commit is contained in:
parent
22674e9b43
commit
68a5f9f073
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, rustPlatform, fetchFromGitHub, coreutils }:
|
{ stdenv, rustPlatform, fetchFromGitHub, coreutils, installShellFiles }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "broot";
|
pname = "broot";
|
||||||
@ -13,10 +13,21 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoSha256 = "09gnyj97akychin1axp9kcww3c04xx7x1qnplhs2yxfki62r4y2b";
|
cargoSha256 = "09gnyj97akychin1axp9kcww3c04xx7x1qnplhs2yxfki62r4y2b";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace src/verb_store.rs --replace '"/bin/' '"${coreutils}/bin/'
|
substituteInPlace src/verb_store.rs --replace '"/bin/' '"${coreutils}/bin/'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# install shell completion files
|
||||||
|
OUT_DIR=target/release/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; {
|
meta = with stdenv.lib; {
|
||||||
description = "An interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands";
|
description = "An interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands";
|
||||||
homepage = "https://dystroy.org/broot/";
|
homepage = "https://dystroy.org/broot/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user