nixpkgs/pkgs/applications/networking/cluster/pinniped/default.nix
2023-08-13 03:57:59 +00:00

36 lines
921 B
Nix

{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
buildGoModule rec{
pname = "pinniped";
version = "0.25.0";
src = fetchFromGitHub {
owner = "vmware-tanzu";
repo = "pinniped";
rev = "v${version}";
sha256 = "sha256-tUdPeBqAXYaBB2rtkhrhN3kRSVv8dg0UI7GEmIdO+fc=";
};
subPackages = "cmd/pinniped";
vendorHash = "sha256-IFVXNd1UkfZiw8YKG3v9uHCJQCE3ajOsjbHv5r3y3L4=";
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/";
license = licenses.asl20;
maintainers = with maintainers; [ bpaulin ];
};
}