lsd: use installShellCompletion
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
{ stdenv, fetchFromGitHub, rustPlatform }:
|
{ stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, rustPlatform
|
||||||
|
, installShellFiles
|
||||||
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "lsd";
|
pname = "lsd";
|
||||||
@@ -13,10 +17,9 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoSha256 = "13g0p6zh2b1z005lszll098d4lv62dzsxwhl76bianzrydif61lr";
|
cargoSha256 = "13g0p6zh2b1z005lszll098d4lv62dzsxwhl76bianzrydif61lr";
|
||||||
|
|
||||||
preFixup = ''
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
install -Dm644 -t $out/share/zsh/site-functions/ target/release/build/lsd-*/out/_lsd
|
postInstall = ''
|
||||||
install -Dm644 -t $out/share/fish/vendor_completions.d/ target/release/build/lsd-*/out/lsd.fish
|
installShellCompletion target/release/build/lsd-*/out/{_lsd,lsd.{bash,fish}}
|
||||||
install -Dm644 -t $out/share/bash-completion/completions/ target/release/build/lsd-*/out/lsd.bash
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|||||||
Reference in New Issue
Block a user