nixpkgs/pkgs/tools/security/rekor/default.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

2021-03-27 16:00:20 +00:00
{ lib, buildGoModule, fetchFromGitHub }:
2021-03-27 16:16:20 +00:00
let
generic = { pname, packageToBuild, description }:
2021-03-27 16:16:20 +00:00
buildGoModule rec {
inherit pname;
version = "0.3.0";
2021-03-27 16:00:20 +00:00
2021-03-27 16:16:20 +00:00
src = fetchFromGitHub {
owner = "sigstore";
repo = "rekor";
rev = "v${version}";
sha256 = "sha256-FaVZm9C1pewJCZlYgNyD/ZYr/UIRvhqVTUhFTmysxeg=";
2021-03-27 16:16:20 +00:00
};
2021-03-27 16:00:20 +00:00
vendorSha256 = "sha256-EBKj/+ruE88qvlbOme4GBfAqt3/1jHcqhY0IHxh6Y5U=";
2021-03-27 16:00:20 +00:00
subPackages = [ packageToBuild ];
ldflags = [ "-s" "-w" "-X github.com/sigstore/rekor/${packageToBuild}/app.gitVersion=v${version}" ];
2021-03-27 16:00:20 +00:00
2021-03-27 16:16:20 +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 jk ];
2021-03-27 16:16:20 +00:00
};
};
in {
rekor-cli = generic {
pname = "rekor-cli";
packageToBuild = "cmd/rekor-cli";
2021-03-27 16:00:20 +00:00
description = "CLI client for Sigstore, the Signature Transparency Log";
2021-03-27 16:16:20 +00:00
};
rekor-server = generic {
pname = "rekor-server";
packageToBuild = "cmd/rekor-server";
2021-03-27 16:16:20 +00:00
description = "Sigstore server, the Signature Transparency Log";
2021-03-27 16:00:20 +00:00
};
}