mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
pinact: add shell completions
This commit is contained in:
parent
b0713aca86
commit
7dec5f132b
1 changed files with 13 additions and 0 deletions
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
buildGoModule,
|
buildGoModule,
|
||||||
|
installShellFiles,
|
||||||
versionCheckHook,
|
versionCheckHook,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
}:
|
}:
|
||||||
|
@ -26,6 +28,17 @@ buildGoModule (finalAttrs: {
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||||
|
installShellCompletion --cmd '${mainProgram}' \
|
||||||
|
--bash <("$out/bin/${mainProgram}" completion bash) \
|
||||||
|
--zsh <("$out/bin/${mainProgram}" completion zsh) \
|
||||||
|
--fish <("$out/bin/${mainProgram}" completion fish)
|
||||||
|
'';
|
||||||
|
|
||||||
nativeInstallCheckInputs = [
|
nativeInstallCheckInputs = [
|
||||||
versionCheckHook
|
versionCheckHook
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue