571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
38 lines
1.0 KiB
Nix
38 lines
1.0 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
buildGoModule rec {
|
|
pname = "spire";
|
|
version = "1.11.0";
|
|
|
|
outputs = [ "out" "agent" "server" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "spiffe";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-0L3RRCItRzgt0RBhTbqx0Myg3UlP1JNPibwSDfx8+oI=";
|
|
};
|
|
|
|
vendorHash = "sha256-hvgJvDv4rnpS3T4EOgQBjMp59O6fAPK3AD1eKvplJi4=";
|
|
|
|
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 ];
|
|
};
|
|
}
|