nixpkgs/pkgs/by-name/pi/pinact/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
973 B
Nix
Raw Normal View History

2023-10-16 04:09:32 -06:00
{ lib
, fetchFromGitHub
2024-02-14 07:45:15 -07:00
, buildGoModule
2023-10-16 04:09:32 -06:00
, testers
, pinact
}:
let
pname = "pinact";
2024-11-06 03:50:04 -07:00
version = "1.0.0";
2023-10-16 04:09:32 -06:00
src = fetchFromGitHub {
owner = "suzuki-shunsuke";
repo = "pinact";
rev = "v${version}";
2024-11-06 03:50:04 -07:00
hash = "sha256-fOmQDfqG1aWzpL80Nc8JA6HWQR+z9mhqtwU4rC2g2Gg=";
2023-10-16 04:09:32 -06:00
};
in
2024-02-14 07:45:15 -07:00
buildGoModule {
2023-10-16 04:09:32 -06:00
inherit pname version src;
2024-11-06 03:50:04 -07:00
vendorHash = "sha256-AFlkzs5mL/x9CwfF2apLcQbiu60GD33oFH6lQDHAL1M=";
2023-10-16 04:09:32 -06:00
doCheck = true;
passthru.tests.version = testers.testVersion {
package = pinact;
command = "pinact --version";
version = src.rev;
};
ldflags = [
"-s"
"-w"
"-X main.version=${version} -X main.commit=${src.rev}"
];
meta = with lib; {
description = "Pin GitHub Actions versions";
homepage = "https://github.com/suzuki-shunsuke/pinact";
changelog = "https://github.com/suzuki-shunsuke/pinact/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = [ maintainers.kachick ];
mainProgram = "pinact";
};
}