2021-04-05 15:23:46 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
let
|
2021-06-28 23:13:55 +00:00
|
|
|
generic = { pname, packageToBuild, description }:
|
2021-04-05 15:23:46 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
inherit pname;
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.2.0";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigstore";
|
|
|
|
repo = "rekor";
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "1y6qw55r30jgkcwc6434ly0v9dcfa2lc7z5djn7rjcqrjg3gn7yv";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
vendorSha256 = "1wlh505ypwyr91wi80fpbap3far3fljwjd4mql2qcqgg0b1yay9s";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
subPackages = [ packageToBuild ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
buildFlagsArray+=("-ldflags" "-s -w -X github.com/sigstore/rekor/${packageToBuild}/app.gitVersion=v${version}")
|
|
|
|
'';
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
inherit description;
|
|
|
|
homepage = "https://github.com/sigstore/rekor";
|
|
|
|
changelog = "https://github.com/sigstore/rekor/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lesuisse ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
rekor-cli = generic {
|
|
|
|
pname = "rekor-cli";
|
2021-06-28 23:13:55 +00:00
|
|
|
packageToBuild = "cmd/rekor-cli";
|
2021-04-05 15:23:46 +00:00
|
|
|
description = "CLI client for Sigstore, the Signature Transparency Log";
|
|
|
|
};
|
|
|
|
rekor-server = generic {
|
|
|
|
pname = "rekor-server";
|
2021-06-28 23:13:55 +00:00
|
|
|
packageToBuild = "cmd/rekor-server";
|
2021-04-05 15:23:46 +00:00
|
|
|
description = "Sigstore server, the Signature Transparency Log";
|
|
|
|
};
|
|
|
|
}
|