File tree Expand file tree Collapse file tree 1 file changed +25
-16
lines changed
Expand file tree Collapse file tree 1 file changed +25
-16
lines changed Original file line number Diff line number Diff line change 22 lib ,
33 fetchFromGitHub ,
44 buildGoModule ,
5- testers ,
5+ versionCheckHook ,
66 nix-update-script ,
7- pinact ,
87} :
98
109let
1110 pname = "pinact" ;
12- version = "1.0.0 " ;
11+ version = "1.1.2 " ;
1312 src = fetchFromGitHub {
1413 owner = "suzuki-shunsuke" ;
1514 repo = "pinact" ;
16- rev = "v${ version } " ;
17- hash = "sha256-fOmQDfqG1aWzpL80Nc8JA6HWQR+z9mhqtwU4rC2g2Gg =" ;
15+ tag = "v${ version } " ;
16+ hash = "sha256-QBWxs0YRTWItJ1aTG33Z6vK8/vaZBTuZAVPYqD6dIvE =" ;
1817 } ;
18+ mainProgram = "pinact" ;
1919in
2020buildGoModule {
2121 inherit pname version src ;
2222
23- vendorHash = "sha256-AFlkzs5mL/x9CwfF2apLcQbiu60GD33oFH6lQDHAL1M=" ;
23+ vendorHash = "sha256-Y44nJv0eWM0xO+lB56OBcEe/CCipPj8Ptg7WuJ2Vszo=" ;
24+
25+ env . CGO_ENABLED = 0 ;
2426
2527 doCheck = true ;
2628
27- passthru = {
28- tests . version = testers . testVersion {
29- package = pinact ;
30- } ;
29+ nativeInstallCheckInputs = [
30+ versionCheckHook
31+ ] ;
32+ doInstallCheck = true ;
33+ versionCheckProgram = "${ placeholder "out" } /bin/${ mainProgram } " ;
34+ versionCheckProgramArg = [ "version" ] ;
3135
36+ passthru = {
3237 updateScript = nix-update-script { } ;
3338 } ;
3439
3540 ldflags = [
3641 "-s"
3742 "-w"
38- "-X main.version=${ version } -X main.commit=${ src . rev } "
43+ "-X main.version=${ version } -X main.commit=v${ version } "
44+ ] ;
45+
46+ subPackages = [
47+ "cmd/pinact"
3948 ] ;
4049
41- meta = with lib ; {
50+ meta = {
51+ inherit mainProgram ;
4252 description = "Pin GitHub Actions versions" ;
4353 homepage = "https://github.com/suzuki-shunsuke/pinact" ;
44- changelog = "https://github.com/suzuki-shunsuke/pinact/releases/tag/${ src . rev } " ;
45- license = licenses . mit ;
46- maintainers = [ maintainers . kachick ] ;
47- mainProgram = "pinact" ;
54+ changelog = "https://github.com/suzuki-shunsuke/pinact/releases/tag/v${ version } " ;
55+ license = lib . licenses . mit ;
56+ maintainers = with lib . maintainers ; [ kachick ] ;
4857 } ;
4958}
You can’t perform that action at this time.
0 commit comments