tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
argo: build staticfiles with buildGoModule
Aaron Jheng
3 years ago
31e19529
9813adc7
+17
-4
2 changed files
expand all
collapse all
unified
split
pkgs
applications
networking
cluster
argo
default.nix
staticfiles.go.mod
+14
-4
pkgs/applications/networking/cluster/argo/default.nix
···
12
12
# We build the CLI without the static server for simplicity, but the tool is still required for
13
13
# compilation to succeed.
14
14
# See: https://github.com/argoproj/argo/blob/d7690e32faf2ac5842468831daf1443283703c25/Makefile#L117
15
15
-
staticfiles = pkgsBuildBuild.buildGoPackage rec {
15
15
+
staticfiles = pkgsBuildBuild.buildGoModule rec {
16
16
name = "staticfiles";
17
17
+
17
18
src = fetchFromGitHub {
18
19
owner = "bouk";
19
20
repo = "staticfiles";
20
21
rev = "827d7f6389cd410d0aa3f3d472a4838557bf53dd";
21
21
-
sha256 = "0xarhmsqypl8036w96ssdzjv3k098p2d4mkmw5f6hkp1m3j67j61";
22
22
+
hash = "sha256-wchj5KjhTmhc4XVW0sRFCcyx5W9am8TNAIhej3WFWXU=";
22
23
};
23
24
24
24
-
goPackagePath = "bou.ke/staticfiles";
25
25
+
vendorHash = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
26
26
+
27
27
+
excludedPackages = [ "./example" ];
28
28
+
29
29
+
preBuild = ''
30
30
+
cp ${./staticfiles.go.mod} go.mod
31
31
+
'';
32
32
+
33
33
+
ldflags = [ "-s" "-w" ];
25
34
};
26
35
in
27
36
buildGoModule rec {
···
55
64
'';
56
65
57
66
ldflags = [
58
58
-
"-s" "-w"
67
67
+
"-s"
68
68
+
"-w"
59
69
"-X github.com/argoproj/argo-workflows/v3.buildDate=unknown"
60
70
"-X github.com/argoproj/argo-workflows/v3.gitCommit=${src.rev}"
61
71
"-X github.com/argoproj/argo-workflows/v3.gitTag=${src.rev}"
+3
pkgs/applications/networking/cluster/argo/staticfiles.go.mod
···
1
1
+
module bou.ke/staticfiles
2
2
+
3
3
+
go 1.18