2022-10-21 18:38:19 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, stdenv, makeWrapper, gitMinimal }:
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gitsign";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "0.3.2";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigstore";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-hDVn7ZiZoY0FSgIsApZliMIq1xjuNdg+DMvKzP5kET0=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
vendorSha256 = "sha256-5hVcul5DlHZ0Gtw1LdBmxGpsmuD2bTtwPGysOUwe2k0=";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" "-buildid=" "-X github.com/sigstore/gitsign/pkg/version.gitVersion=${version}" ];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
postInstall = ''
|
|
|
|
for f in $out/bin/*; do
|
|
|
|
wrapProgram $f --prefix PATH : ${lib.makeBinPath [ gitMinimal ]}
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
maintainers = with lib.maintainers; [ lesuisse ];
|
|
|
|
};
|
|
|
|
}
|