nixpkgs/pkgs/applications/networking/cluster/pinniped/default.nix
2024-03-24 23:01:15 +01:00

37 lines
951 B
Nix

{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
buildGoModule rec{
pname = "pinniped";
version = "0.29.0";
src = fetchFromGitHub {
owner = "vmware-tanzu";
repo = "pinniped";
rev = "v${version}";
sha256 = "sha256-O8P7biLlRCl/mhrhi9Tn5DSEv6/SbK4S6hcyQrN76Ds=";
};
subPackages = "cmd/pinniped";
vendorHash = "sha256-57Soek3iDlBPoZR3dw6Z/fY+UZTdrc3Cgc5ddAT3S0A=";
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";
mainProgram = "pinniped";
homepage = "https://pinniped.dev/";
license = licenses.asl20;
maintainers = with maintainers; [ bpaulin ];
};
}