Commit 7df7a3f4 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt
Browse files

pkgsStatic.gum: fix build

parent 2f790964
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -23,10 +23,16 @@ buildGoModule rec {
    installShellFiles
  ];

  ldflags = [
  ldflags =
    [
      "-s"
      "-w"
      "-X=main.Version=${version}"
    ]
    ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic) [
      "-linkmode=external"
      "-extldflags"
      "-static"
    ];

  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''