about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/popeye
diff options
context:
space:
mode:
authorMaxime Brunet <max@brnt.mx>2024-02-23 12:48:29 -0800
committerMaxime Brunet <max@brnt.mx>2024-02-23 12:50:31 -0800
commita33b9f25ddd9a1efe5d8eef8d3200f169f3b0db9 (patch)
tree0ca10478ec9e2f79fe1ce165efea4e7e2efdf6b0 /pkgs/applications/networking/cluster/popeye
parent899fe5550bd324dd8356c1ef652faf892cefb88e (diff)
popeye: install shell completion
Diffstat (limited to 'pkgs/applications/networking/cluster/popeye')
-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 c955ebec3d22a..2ba14a8978cbc 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-Vt5QwggdasVk4j2huSIneBMemi3Q0R4MgZn2yNlOH5E=";
 
+  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