Skip to content

Commit 4560cf4

Browse files
authored
ahoy: 2.2.0 -> 2.4.0 (#398663)
2 parents 3548291 + 30ac05c commit 4560cf4

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

pkgs/by-name/ah/ahoy/package.nix

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,42 @@
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+
})

0 commit comments

Comments
 (0)