rekor-cli, rekor-server: 0.1.1 -> 0.2.0
https://github.com/sigstore/rekor/releases/tag/v0.2.0
This commit is contained in:
parent
bb4697102b
commit
7a026e7465
1 changed files with 11 additions and 19 deletions
|
@ -1,21 +1,25 @@
|
||||||
{ lib, buildGoModule, fetchFromGitHub }:
|
{ lib, buildGoModule, fetchFromGitHub }:
|
||||||
|
|
||||||
let
|
let
|
||||||
generic = { pname, subPackages, description, postInstall }:
|
generic = { pname, packageToBuild, description }:
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
inherit pname;
|
inherit pname;
|
||||||
version = "0.1.1";
|
version = "0.2.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sigstore";
|
owner = "sigstore";
|
||||||
repo = "rekor";
|
repo = "rekor";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1hvkfvc747g5r4h8vb1d8ikqxmlyxsycnlh78agmmjpxlasspmbk";
|
sha256 = "1y6qw55r30jgkcwc6434ly0v9dcfa2lc7z5djn7rjcqrjg3gn7yv";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "0vdir9ia3hv27rkm6jnvhsfc3mxw36xfvwqnfd34rgzmzcfxlrbv";
|
vendorSha256 = "1wlh505ypwyr91wi80fpbap3far3fljwjd4mql2qcqgg0b1yay9s";
|
||||||
|
|
||||||
inherit subPackages postInstall;
|
subPackages = [ packageToBuild ];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
buildFlagsArray+=("-ldflags" "-s -w -X github.com/sigstore/rekor/${packageToBuild}/app.gitVersion=v${version}")
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
inherit description;
|
inherit description;
|
||||||
|
@ -28,24 +32,12 @@ let
|
||||||
in {
|
in {
|
||||||
rekor-cli = generic {
|
rekor-cli = generic {
|
||||||
pname = "rekor-cli";
|
pname = "rekor-cli";
|
||||||
subPackages = [ "cmd/cli" ];
|
packageToBuild = "cmd/rekor-cli";
|
||||||
# Will not be needed with the next version, the package as been renamed upstream
|
|
||||||
postInstall = ''
|
|
||||||
if [ -f "$out/bin/cli" ]; then
|
|
||||||
mv "$out/bin/cli" "$out/bin/rekor-client"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
description = "CLI client for Sigstore, the Signature Transparency Log";
|
description = "CLI client for Sigstore, the Signature Transparency Log";
|
||||||
};
|
};
|
||||||
rekor-server = generic {
|
rekor-server = generic {
|
||||||
pname = "rekor-server";
|
pname = "rekor-server";
|
||||||
subPackages = [ "cmd/server" ];
|
packageToBuild = "cmd/rekor-server";
|
||||||
# Will not be needed with the next version, the package as been renamed upstream
|
|
||||||
postInstall = ''
|
|
||||||
if [ -f "$out/bin/server" ]; then
|
|
||||||
mv "$out/bin/server" "$out/bin/rekor-server"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
description = "Sigstore server, the Signature Transparency Log";
|
description = "Sigstore server, the Signature Transparency Log";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue