From 0ba85d2ee60ab898c9572f6f7ad23fbbfd4cfdf7 Mon Sep 17 00:00:00 2001 From: Robert Rose Date: Wed, 7 Jan 2026 09:47:22 +0100 Subject: [PATCH] k3s: remove curl command from version script in buildPhase The line is only present for versions >= 1.35, so the substitute command fails silently if not present. --- pkgs/applications/networking/cluster/k3s/builder.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/applications/networking/cluster/k3s/builder.nix b/pkgs/applications/networking/cluster/k3s/builder.nix index 38835677408a..c6c5f758dfc8 100644 --- a/pkgs/applications/networking/cluster/k3s/builder.nix +++ b/pkgs/applications/networking/cluster/k3s/builder.nix @@ -399,6 +399,13 @@ buildGoModule (finalAttrs: { --replace-fail \ "go list -mod=readonly -m -f '{{if .Replace}}{{.Replace.Version}}{{else}}{{.Version}}{{end}}' \$1" \ "go list -mod=readonly -e -m -f '{{if .Replace}}{{.Replace.Version}}{{else}}{{.Version}}{{end}}' \$1" + + # Can't use curl during the build, we use our own go version anyway. + # Fails quiet as this line is only present starting from 1.35 + substituteInPlace scripts/version.sh \ + --replace-quiet \ + 'VERSION_GOLANG="go"$(curl -sL "https://raw.githubusercontent.com''${PKG_KUBERNETES_K3S/github.com/}/refs/tags/''${VERSION_K8S_K3S}/.go-version")' \ + "" ''; # Important utilities used by the kubelet, see