diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/security/spire/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/security/spire/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/security/spire/default.nix b/nixpkgs/pkgs/tools/security/spire/default.nix new file mode 100644 index 000000000000..4533ad33da68 --- /dev/null +++ b/nixpkgs/pkgs/tools/security/spire/default.nix @@ -0,0 +1,37 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "spire"; + version = "1.8.3"; + + outputs = [ "out" "agent" "server" ]; + + src = fetchFromGitHub { + owner = "spiffe"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-xfSOmUfBoIQSI9u2YD3CxBIOiT7QxMi3fJZUVeZo39o="; + }; + + vendorHash = "sha256-9j/EZntVW40QHYJi9NvAKX/4uGxLolk75GNennQ6ymY="; + + subPackages = [ "cmd/spire-agent" "cmd/spire-server" ]; + + # Usually either the agent or server is needed for a given use case, but not both + postInstall = '' + mkdir -vp $agent/bin $server/bin + mv -v $out/bin/spire-agent $agent/bin/ + mv -v $out/bin/spire-server $server/bin/ + + ln -vs $agent/bin/spire-agent $out/bin/spire-agent + ln -vs $server/bin/spire-server $out/bin/spire-server + ''; + + meta = with lib; { + description = "The SPIFFE Runtime Environment"; + homepage = "https://github.com/spiffe/spire"; + changelog = "https://github.com/spiffe/spire/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ jonringer fkautz ]; + }; +} |