Unverified Commit a72e7d75 authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

argo-workflows: remove unused staticfiles (#423982)

parents 34b3916e 82eb03f6
Loading
Loading
Loading
Loading
+0 −36
Original line number Diff line number Diff line
@@ -7,35 +7,6 @@
  pkgsBuildBuild,
}:

let
  # Argo can package a static server in the CLI using the `staticfiles` go module.
  # 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.buildGoModule {
    name = "staticfiles";

    src = fetchFromGitHub {
      owner = "bouk";
      repo = "staticfiles";
      rev = "827d7f6389cd410d0aa3f3d472a4838557bf53dd";
      hash = "sha256-wchj5KjhTmhc4XVW0sRFCcyx5W9am8TNAIhej3WFWXU=";
    };

    vendorHash = null;

    excludedPackages = [ "./example" ];

    preBuild = ''
      cp ${./staticfiles.go.mod} go.mod
    '';

    ldflags = [
      "-s"
      "-w"
    ];
  };
in
buildGoModule rec {
  pname = "argo-workflows";
  version = "3.6.10";
@@ -59,13 +30,6 @@ buildGoModule rec {
    installShellFiles
  ];

  preBuild = ''
    mkdir -p ui/dist/app
    echo "Built without static files" > ui/dist/app/index.html

    ${staticfiles}/bin/staticfiles -o server/static/files.go ui/dist/app
  '';

  ldflags = [
    "-s"
    "-w"