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-03-04 12:14:45 +00:00
|
|
|
version = "1.6.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "agent" "server" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spiffe";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-4OSzb0VMMSQSlD8951nJmRnehJw2IQI6fEYO/Y5hZiU=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
vendorHash = "sha256-nYi4ZQHsrFSyB+5YI+nlaZ28FaefG3EZ+tT3SX/bI7o=";
|
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
|
|
|
};
|
|
|
|
}
|