2023-04-12 12:48:02 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, stdenv, makeWrapper, gitMinimal, testers, gitsign }:
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gitsign";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "0.6.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigstore";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-VgkTFYnHKpqZOack5SabOFu2BRespVRhgrsepo0V1mI=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
2023-04-12 12:48:02 +00:00
|
|
|
vendorHash = "sha256-zalysp+90+QM5hX7yUudJW61h+3tQOab7ZpcF5kZSB0=";
|
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"."
|
|
|
|
"cmd/gitsign-credential-cache"
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" "-buildid=" "-X github.com/sigstore/gitsign/pkg/version.gitVersion=${version}" ];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
preCheck = ''
|
|
|
|
# test all paths
|
|
|
|
unset subPackages
|
|
|
|
'';
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
postInstall = ''
|
|
|
|
for f in $out/bin/*; do
|
|
|
|
wrapProgram $f --prefix PATH : ${lib.makeBinPath [ gitMinimal ]}
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = gitsign; };
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/sigstore/gitsign";
|
|
|
|
changelog = "https://github.com/sigstore/gitsign/releases/tag/v${version}";
|
|
|
|
description = "Keyless Git signing using Sigstore";
|
|
|
|
license = lib.licenses.asl20;
|
2023-03-08 16:32:21 +00:00
|
|
|
maintainers = with lib.maintainers; [ lesuisse developer-guy ];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
}
|