Skip to content

Commit 168e0b2

Browse files
committed
keep-sorted: 0.5.1 -> 0.6.0
Signed-off-by: Paul Meyer <[email protected]>
1 parent 2ab4a08 commit 168e0b2

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

pkgs/by-name/ke/keep-sorted/package.nix

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
{
22
lib,
3-
buildGo123Module,
3+
buildGoModule,
44
fetchFromGitHub,
55
nix-update-script,
6+
versionCheckHook,
67
}:
78

8-
buildGo123Module rec {
9+
buildGoModule rec {
910
pname = "keep-sorted";
10-
version = "0.5.1";
11+
version = "0.6.0";
1112

1213
src = fetchFromGitHub {
1314
owner = "google";
1415
repo = "keep-sorted";
15-
rev = "v${version}";
16-
hash = "sha256-xvSEREEOiwft3fPN+xtdMCh+z3PknjJ962Nb+pw715U=";
16+
tag = "v${version}";
17+
hash = "sha256-ROvj7w8YMq6+ntx0SWi+HfN4sO6d7RjKWwlb/9gfz8w=";
1718
};
1819

1920
vendorHash = "sha256-HTE9vfjRmi5GpMue7lUfd0jmssPgSOljbfPbya4uGsc=";
2021

22+
# Inject version string instead of reading version from buildinfo.
23+
postPatch = ''
24+
substituteInPlace main.go \
25+
--replace-fail 'readVersion())' '"v${version}")'
26+
'';
27+
2128
env.CGO_ENABLED = "0";
2229

2330
ldflags = [ "-s" ];
@@ -27,6 +34,10 @@ buildGo123Module rec {
2734
rm goldens/*_test.go
2835
'';
2936

37+
nativeInstallCheckInputs = [ versionCheckHook ];
38+
39+
doInstallCheck = true;
40+
3041
passthru.updateScript = nix-update-script { };
3142

3243
meta = {

0 commit comments

Comments
 (0)