03f60a8ed0
Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{ lib, buildGo118Module, fetchFromGitHub }:
|
|
|
|
buildGo118Module rec {
|
|
pname = "spire";
|
|
version = "1.3.1";
|
|
|
|
outputs = [ "out" "agent" "server" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "spiffe";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-8LDdHChCTSpepwTMg2hUvQ6ZDoqaZt9QeKrBgfIOLx8=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-QgPDhUu5uCkmC6L5UKtnz/wt/M1rERxc5nXmVVPtRKY=";
|
|
|
|
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 ];
|
|
};
|
|
}
|