just: use installShellFiles
This commit is contained in:
parent
ef0f57ff8a
commit
8085245fff
@ -1,4 +1,5 @@
|
|||||||
{ stdenv, fetchFromGitHub, rustPlatform, coreutils, bash, dash }:
|
{ stdenv, fetchFromGitHub, rustPlatform, coreutils, bash, dash
|
||||||
|
, installShellFiles }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "just";
|
pname = "just";
|
||||||
@ -13,14 +14,14 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoSha256 = "05mrzav3aydvwac9jjckdmlxvxnlcncmkfsdb9z7zvxia4k89w1l";
|
cargoSha256 = "05mrzav3aydvwac9jjckdmlxvxnlcncmkfsdb9z7zvxia4k89w1l";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# generate completion scripts for just
|
installManPage man/just.1
|
||||||
|
|
||||||
mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
|
installShellCompletion --bash --name just.bash completions/just.bash
|
||||||
|
installShellCompletion --fish --name just.fish completions/just.fish
|
||||||
$out/bin/just --completions bash > "$out/share/bash-completion/completions/just"
|
installShellCompletion --zsh --name _just completions/just.zsh
|
||||||
$out/bin/just --completions fish > "$out/share/fish/vendor_completions.d/just.fish"
|
|
||||||
$out/bin/just --completions zsh > "$out/share/zsh/site-functions/_just"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkInputs = [ coreutils bash dash ];
|
checkInputs = [ coreutils bash dash ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user