2022-01-13 20:06:32 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "spire";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.2.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "agent" "server" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spiffe";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "01ph9jzh18bnidrsbnnxm3gxh0cgfllnjvf7a5haqz51lm6a9pny";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
vendorSha256 = "1fd1k5by4wcjmzfgi3gnrwnb38b0wa3w67kzjlx8s0nwapyfgx0b";
|
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";
|
|
|
|
homepage = "github.com/spiffe/spire";
|
|
|
|
license = licenses.asl20;
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ jonringer fkautz ];
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
}
|