git-statuses: install shell completion
This commit is contained in:
parent
16e356cb23
commit
607ab00371
@ -2,10 +2,12 @@
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
installShellFiles,
|
||||
pkg-config,
|
||||
openssl,
|
||||
git,
|
||||
versionCheckHook,
|
||||
stdenv,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
@ -26,6 +28,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
env.OPENSSL_NO_VENDOR = 1;
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
@ -37,6 +40,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
];
|
||||
doInstallCheck = true;
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd git-statuses \
|
||||
--bash <($out/bin/git-statuses --completions bash) \
|
||||
--fish <($out/bin/git-statuses --completions fish) \
|
||||
--zsh <($out/bin/git-statuses --completions zsh)
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user