mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +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,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
installShellFiles,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
@ -26,6 +28,17 @@ buildGoModule (finalAttrs: {
|
|||
|
||||
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 = [
|
||||
versionCheckHook
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue