From a33b9f25ddd9a1efe5d8eef8d3200f169f3b0db9 Mon Sep 17 00:00:00 2001 From: Maxime Brunet Date: Fri, 23 Feb 2024 12:48:29 -0800 Subject: popeye: install shell completion --- pkgs/applications/networking/cluster/popeye/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/popeye/default.nix b/pkgs/applications/networking/cluster/popeye/default.nix index c955ebec3d22..2ba14a8978cb 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 -- cgit 1.4.1