2024-07-27 06:49:29 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, gitMinimal, testers, gitsign }:
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gitsign";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.10.2";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigstore";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-JNCz5MVqn8PeTfYUVowIVZwtpfD+Gx9yBckter6PfXA=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
vendorHash = "sha256-QW+ZWYEXkhSQR4HvmPLENzY/VEfjEX43mBPhmhsEBMI=";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"."
|
|
|
|
"cmd/gitsign-credential-cache"
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/sigstore/gitsign/pkg/version.gitVersion=${version}" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|