Commit 42a3611c authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

k3s: use `--replace-fail`

parent f2c5012e
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -346,15 +346,13 @@ buildGoModule (finalAttrs: {
    # Nix prefers dynamically linked binaries over static binary.

    substituteInPlace scripts/package-cli \
      --replace '"$LDFLAGS $STATIC" -o' \
                '"$LDFLAGS" -o' \
      --replace "STATIC=\"-extldflags \'-static\'\"" \
                ""
      --replace-fail '"$LDFLAGS $STATIC" -o' \
                '"$LDFLAGS" -o'

    # Upstream codegen fails with trimpath set. Removes "trimpath" for 'go generate':

    substituteInPlace scripts/package-cli \
      --replace '"''${GO}" generate' \
      --replace-fail '"''${GO}" generate' \
                'GOFLAGS="" \
                 GOOS="${pkgsBuildBuild.go.GOOS}" \
                 GOARCH="${pkgsBuildBuild.go.GOARCH}" \