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

52 lines
1.5 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, subPackages, description, postInstall }:
buildGoModule rec {
inherit pname;
version = "0.1.1";
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 = "1hvkfvc747g5r4h8vb1d8ikqxmlyxsycnlh78agmmjpxlasspmbk";
};
2021-03-27 16:00:20 +00:00
2021-03-27 16:16:20 +00:00
vendorSha256 = "0vdir9ia3hv27rkm6jnvhsfc3mxw36xfvwqnfd34rgzmzcfxlrbv";
2021-03-27 16:00:20 +00:00
2021-03-27 16:16:20 +00:00
inherit subPackages postInstall;
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 ];
};
};
in {
rekor-cli = generic {
pname = "rekor-cli";
subPackages = [ "cmd/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
'';
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";
subPackages = [ "cmd/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";
2021-03-27 16:00:20 +00:00
};
}