2022-10-11 19:04:46 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, stdenv, makeWrapper, gitMinimal }:
|
2022-05-14 17:52:45 +02:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gitsign";
|
2022-12-02 17:49:39 +01:00
|
|
|
version = "0.4.1";
|
2022-05-14 17:52:45 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigstore";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-12-02 17:49:39 +01:00
|
|
|
sha256 = "sha256-lSE4BLwtxicngvnDCcMa6F6c3+Okn9NKAOnT2FGi7kU=";
|
2022-05-14 17:52:45 +02:00
|
|
|
};
|
2022-12-02 17:49:39 +01:00
|
|
|
vendorSha256 = "sha256-WrVunAxOXXGSbs9OyKydeg4N/s871mt2O3t2e5DxXQo=";
|
2022-10-11 19:04:46 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-05-14 17:52:45 +02:00
|
|
|
|
2022-06-15 08:35:59 +02:00
|
|
|
ldflags = [ "-s" "-w" "-buildid=" "-X github.com/sigstore/gitsign/pkg/version.gitVersion=${version}" ];
|
2022-05-14 17:52:45 +02:00
|
|
|
|
2022-10-11 19:04:46 +02:00
|
|
|
postInstall = ''
|
|
|
|
for f in $out/bin/*; do
|
|
|
|
wrapProgram $f --prefix PATH : ${lib.makeBinPath [ gitMinimal ]}
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2022-05-14 17:52:45 +02: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-07 09:06:17 +01:00
|
|
|
maintainers = with lib.maintainers; [ lesuisse developer-guy ];
|
2022-05-14 17:52:45 +02:00
|
|
|
};
|
|
|
|
}
|