2021-03-27 17:00:20 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
2021-03-27 17:16:20 +01:00
|
|
|
let
|
2021-06-17 10:40:33 +02:00
|
|
|
generic = { pname, packageToBuild, description }:
|
2021-03-27 17:16:20 +01:00
|
|
|
buildGoModule rec {
|
|
|
|
inherit pname;
|
2021-12-28 17:59:34 +01:00
|
|
|
version = "0.4.0";
|
2021-03-27 17:00:20 +01:00
|
|
|
|
2021-03-27 17:16:20 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigstore";
|
|
|
|
repo = "rekor";
|
|
|
|
rev = "v${version}";
|
2021-12-28 17:59:34 +01:00
|
|
|
sha256 = "sha256-15p4hm4Cvs/yLaQIcxctVdMKRWPjIIFwBcbru6QcjXo=";
|
2021-03-27 17:16:20 +01:00
|
|
|
};
|
2021-03-27 17:00:20 +01:00
|
|
|
|
2021-12-28 17:59:34 +01:00
|
|
|
vendorSha256 = "sha256-XCCO4Vamzj5pJFmu1A8mpTLlVAtocrn20myYJVWtBrY=";
|
2021-03-27 17:00:20 +01:00
|
|
|
|
2021-06-17 10:40:33 +02:00
|
|
|
subPackages = [ packageToBuild ];
|
|
|
|
|
2021-12-28 17:59:34 +01:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/sigstore/rekor/${packageToBuild}/app.GitVersion=v${version}" ];
|
2021-03-27 17:00:20 +01:00
|
|
|
|
2021-03-27 17:16:20 +01: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;
|
2021-07-28 12:35:21 +02:00
|
|
|
maintainers = with maintainers; [ lesuisse jk ];
|
2021-03-27 17:16:20 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
rekor-cli = generic {
|
|
|
|
pname = "rekor-cli";
|
2021-06-17 10:40:33 +02:00
|
|
|
packageToBuild = "cmd/rekor-cli";
|
2021-03-27 17:00:20 +01:00
|
|
|
description = "CLI client for Sigstore, the Signature Transparency Log";
|
2021-03-27 17:16:20 +01:00
|
|
|
};
|
|
|
|
rekor-server = generic {
|
|
|
|
pname = "rekor-server";
|
2021-06-17 10:40:33 +02:00
|
|
|
packageToBuild = "cmd/rekor-server";
|
2021-03-27 17:16:20 +01:00
|
|
|
description = "Sigstore server, the Signature Transparency Log";
|
2021-03-27 17:00:20 +01:00
|
|
|
};
|
|
|
|
}
|