about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/popeye/default.nix
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-03-05 21:00:13 +0100
committerGitHub <noreply@github.com>2024-03-05 21:00:13 +0100
commit63655a393b9d97d543a2ba15ab451e5333c7ae11 (patch)
tree0a70c6a0de9c9c66bf16519d0939d21508a5dc68 /pkgs/applications/networking/cluster/popeye/default.nix
parentf6aa357aea7caccbfc8e2b3deb5520e0e74922d0 (diff)
parenta33b9f25ddd9a1efe5d8eef8d3200f169f3b0db9 (diff)
downloadnixlib-63655a393b9d97d543a2ba15ab451e5333c7ae11.tar
nixlib-63655a393b9d97d543a2ba15ab451e5333c7ae11.tar.gz
nixlib-63655a393b9d97d543a2ba15ab451e5333c7ae11.tar.bz2
nixlib-63655a393b9d97d543a2ba15ab451e5333c7ae11.tar.lz
nixlib-63655a393b9d97d543a2ba15ab451e5333c7ae11.tar.xz
nixlib-63655a393b9d97d543a2ba15ab451e5333c7ae11.tar.zst
nixlib-63655a393b9d97d543a2ba15ab451e5333c7ae11.zip
Merge pull request #290971 from maxbrunet/feat/popeye/shell-completion
popeye: install shell completion
Diffstat (limited to 'pkgs/applications/networking/cluster/popeye/default.nix')
-rw-r--r--pkgs/applications/networking/cluster/popeye/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/applications/networking/cluster/popeye/default.nix b/pkgs/applications/networking/cluster/popeye/default.nix
index f1db435c443c..95a437704120 100644
--- a/pkgs/applications/networking/cluster/popeye/default.nix
+++ b/pkgs/applications/networking/cluster/popeye/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
 
 buildGoModule rec {
   pname = "popeye";
@@ -19,6 +19,15 @@ buildGoModule rec {
 
   vendorHash = "sha256-ThldEPzAwMfNnhUEgHL5/asc+SETKxTrPIJt307tqsg=";
 
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --cmd popeye \
+      --bash <($out/bin/popeye completion bash) \
+      --fish <($out/bin/popeye completion fish) \
+      --zsh <($out/bin/popeye completion zsh)
+  '';
+
   doInstallCheck = true;
   installCheckPhase = ''
     $out/bin/popeye version | grep ${version} > /dev/null