File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
pkgs/by-name/ke/keep-sorted Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
lib ,
3
- buildGo123Module ,
3
+ buildGoModule ,
4
4
fetchFromGitHub ,
5
5
nix-update-script ,
6
+ versionCheckHook ,
6
7
} :
7
8
8
- buildGo123Module rec {
9
+ buildGoModule rec {
9
10
pname = "keep-sorted" ;
10
- version = "0.5.1 " ;
11
+ version = "0.6.0 " ;
11
12
12
13
src = fetchFromGitHub {
13
14
owner = "google" ;
14
15
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 =" ;
17
18
} ;
18
19
19
20
vendorHash = "sha256-HTE9vfjRmi5GpMue7lUfd0jmssPgSOljbfPbya4uGsc=" ;
20
21
22
+ # Inject version string instead of reading version from buildinfo.
23
+ postPatch = ''
24
+ substituteInPlace main.go \
25
+ --replace-fail 'readVersion())' '"v${ version } ")'
26
+ '' ;
27
+
21
28
env . CGO_ENABLED = "0" ;
22
29
23
30
ldflags = [ "-s" ] ;
@@ -27,6 +34,10 @@ buildGo123Module rec {
27
34
rm goldens/*_test.go
28
35
'' ;
29
36
37
+ nativeInstallCheckInputs = [ versionCheckHook ] ;
38
+
39
+ doInstallCheck = true ;
40
+
30
41
passthru . updateScript = nix-update-script { } ;
31
42
32
43
meta = {
You can’t perform that action at this time.
0 commit comments