diff --git a/pkgs/applications/networking/cluster/pinniped/default.nix b/pkgs/applications/networking/cluster/pinniped/default.nix index 9ee8109a94e3..61bb2000e136 100644 --- a/pkgs/applications/networking/cluster/pinniped/default.nix +++ b/pkgs/applications/networking/cluster/pinniped/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildGoModule }: +{ lib, fetchFromGitHub, buildGoModule, installShellFiles }: buildGoModule rec{ pname = "pinniped"; @@ -15,6 +15,17 @@ buildGoModule rec{ vendorSha256 = "sha256-8ohyyciL1ORYOxPu64W0jXASTv+vVZR8StutzbF9N4Y="; + ldflags = [ "-s" "-w" ]; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd pinniped \ + --bash <($out/bin/pinniped completion bash) \ + --fish <($out/bin/pinniped completion fish) \ + --zsh <($out/bin/pinniped completion zsh) + ''; + meta = with lib; { description = "Tool to securely log in to your Kubernetes clusters"; homepage = "https://pinniped.dev/";