File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change 22 lib ,
33 fetchFromGitHub ,
44 buildGoModule ,
5+ versionCheckHook ,
56 nix-update-script ,
67} :
78
8- buildGoModule rec {
9+ buildGoModule ( finalAttrs : {
910 pname = "ahoy" ;
10- version = "2.2 .0" ;
11+ version = "2.4 .0" ;
1112
1213 src = fetchFromGitHub {
1314 owner = "ahoy-cli" ;
1415 repo = "ahoy" ;
15- tag = "v${ version } " ;
16- hash = "sha256-xwjfY9HudxVz3xEEyRPtWysbojtan56ABBL3KgG0J/8 =" ;
16+ tag = "v${ finalAttrs . version } " ;
17+ hash = "sha256-wYsPutdO9ZkXQu4mrFV56mrJTeSFF/3oRaHO0ia7DHk =" ;
1718 } ;
1819
20+ sourceRoot = "${ finalAttrs . src . name } /v2" ;
21+
1922 # vendor folder exists
2023 vendorHash = null ;
2124
22- passthru = {
23- updateScript = nix-update-script { } ;
24- } ;
25+ ldflags = [ "-X main.version=${ finalAttrs . version } " ] ;
26+
27+ doInstallCheck = true ;
28+
29+ nativeInstallCheckInputs = [ versionCheckHook ] ;
30+
31+ versionCheckProgramArg = "--version" ;
32+
33+ passthru . updateScript = nix-update-script { } ;
2534
2635 meta = {
2736 description = "Create self-documenting cli programs from YAML files" ;
2837 homepage = "https://github.com/ahoy-cli/ahoy" ;
29- changelog = "https://github.com/ahoy-cli/ahoy/releases/tag/v${ version } " ;
38+ changelog = "https://github.com/ahoy-cli/ahoy/releases/tag/v${ finalAttrs . version } " ;
3039 license = lib . licenses . mit ;
3140 maintainers = with lib . maintainers ; [ genga898 ] ;
3241 mainProgram = "ahoy" ;
3342 } ;
34- }
43+ } )
You can’t perform that action at this time.
0 commit comments