depot/third_party/nixpkgs/pkgs/tools/security/spire/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

37 lines
1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "spire";
version = "1.10.1";
outputs = [ "out" "agent" "server" ];
src = fetchFromGitHub {
owner = "spiffe";
repo = pname;
rev = "v${version}";
sha256 = "sha256-CSTpiLDGGiuCUOO2qrpqyKGKsIch7YoJW9XdPqT7/rI=";
};
vendorHash = "sha256-x+3UkUs/WJf8CW+FljeHOkYC2oMniknTbJd0DVwnrU8=";
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 = "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; [ fkautz ];
};
}