2022-07-18 16:21:45 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
buildGoModule rec {
|
2022-01-13 20:06:32 +00:00
|
|
|
pname = "spire";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.5.4";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "agent" "server" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spiffe";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-DHN1JL4CYnme3hPbkNPXWXsgFpJ9BIRnGPl/csr43iY=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
vendorHash = "sha256-5MveK7wZ4KpUEZ4lhm95/8bOi5NtYR4n0fSfZhC+GPo=";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
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";
|
2022-03-10 19:12:11 +00:00
|
|
|
homepage = "https://github.com/spiffe/spire";
|
2022-03-30 09:31:56 +00:00
|
|
|
changelog = "https://github.com/spiffe/spire/releases/tag/v${version}";
|
2022-01-13 20:06:32 +00:00
|
|
|
license = licenses.asl20;
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ jonringer fkautz ];
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
}
|