From de266251579d98ba804cbd7f471c93eab1de8fd4 Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Mon, 24 Nov 2025 13:12:36 +0000 Subject: [PATCH] (zilch lang go): bump Go version Also explicitly disable Cgo, as that is necessary for newer versions of Go. Change-Id: I24af36efbe5e2e4b873553c11798bbfa6a6a6964 --- default.nix | 1 - lang/go/src/core.sld | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index 997334c..b027680 100644 --- a/default.nix +++ b/default.nix @@ -5,5 +5,4 @@ pkgs.symlinkJoin { paths = [ (pkgs.callPackage ./cli {}) ]; - postBuild = "echo ${go_1_23} >> $out/.go"; } diff --git a/lang/go/src/core.sld b/lang/go/src/core.sld index b36b5f3..22e71c8 100644 --- a/lang/go/src/core.sld +++ b/lang/go/src/core.sld @@ -42,7 +42,7 @@ (define %goarch (make-parameter "amd64")) ;; The Go toolchain to use to compile this all. - (define go-toolchain (cdr (assoc "out" (nixpkgs "go_1_24")))) + (define go-toolchain (cdr (assoc "out" (nixpkgs "go_1_25")))) ;; Builds an importcfg file. This file describes the mapping of both ;; packages to their api, and the mapping of package name as used in `import` @@ -105,7 +105,9 @@ ;; The environment to append to the build environment for any Go derivation. (define (env-for-goarch) - `(("GOARCH" . ,(%goarch)))) + `(("GOARCH" . ,(%goarch)) + ("CGO_ENABLED" . "0") + ("GOCACHE" . "/build/gocache"))) ;; Extra arguments to add to uses of `++go tool asm++`, to set the expected preprocessor ;; variables.