summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/argo/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/argo/default.nix')
-rw-r--r--pkgs/applications/networking/cluster/argo/default.nix18
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/applications/networking/cluster/argo/default.nix b/pkgs/applications/networking/cluster/argo/default.nix
index f02b6e416c3..ab2d1bd3d3f 100644
--- a/pkgs/applications/networking/cluster/argo/default.nix
+++ b/pkgs/applications/networking/cluster/argo/default.nix
@@ -12,16 +12,25 @@ let
   # We build the CLI without the static server for simplicity, but the tool is still required for
   # compilation to succeed.
   # See: https://github.com/argoproj/argo/blob/d7690e32faf2ac5842468831daf1443283703c25/Makefile#L117
-  staticfiles = pkgsBuildBuild.buildGoPackage rec {
+  staticfiles = pkgsBuildBuild.buildGoModule rec {
     name = "staticfiles";
+
     src = fetchFromGitHub {
       owner = "bouk";
       repo = "staticfiles";
       rev = "827d7f6389cd410d0aa3f3d472a4838557bf53dd";
-      sha256 = "0xarhmsqypl8036w96ssdzjv3k098p2d4mkmw5f6hkp1m3j67j61";
+      hash = "sha256-wchj5KjhTmhc4XVW0sRFCcyx5W9am8TNAIhej3WFWXU=";
     };
 
-    goPackagePath = "bou.ke/staticfiles";
+    vendorHash = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
+
+    excludedPackages = [ "./example" ];
+
+    preBuild = ''
+      cp ${./staticfiles.go.mod} go.mod
+    '';
+
+    ldflags = [ "-s" "-w" ];
   };
 in
 buildGoModule rec {
@@ -55,7 +64,8 @@ buildGoModule rec {
   '';
 
   ldflags = [
-    "-s" "-w"
+    "-s"
+    "-w"
     "-X github.com/argoproj/argo-workflows/v3.buildDate=unknown"
     "-X github.com/argoproj/argo-workflows/v3.gitCommit=${src.rev}"
     "-X github.com/argoproj/argo-workflows/v3.gitTag=${src.rev}"