buildGo{Module,Package}: set GOTOOLCHAIN to local

prevent go from downloading another toolchain

zowoq 86cd7e09 41ccfa32

+4 -2
+3 -2
pkgs/build-support/go/module.nix
··· 53 53 args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "vendorHash" ]; 54 54 55 55 GO111MODULE = "on"; 56 + GOTOOLCHAIN = "local"; 56 57 57 58 goModules = if (vendorHash == null) then "" else 58 59 (stdenv.mkDerivation { ··· 62 63 63 64 inherit (args) src; 64 65 inherit (go) GOOS GOARCH; 65 - inherit GO111MODULE; 66 + inherit GO111MODULE GOTOOLCHAIN; 66 67 67 68 # The following inheritence behavior is not trivial to expect, and some may 68 69 # argue it's not ideal. Changing it may break vendor hashes in Nixpkgs and ··· 151 152 inherit (go) GOOS GOARCH; 152 153 153 154 GOFLAGS = lib.optionals (!proxyVendor) [ "-mod=vendor" ] ++ lib.optionals (!allowGoReference) [ "-trimpath" ]; 154 - inherit CGO_ENABLED enableParallelBuilding GO111MODULE; 155 + inherit CGO_ENABLED enableParallelBuilding GO111MODULE GOTOOLCHAIN; 155 156 156 157 configurePhase = args.configurePhase or ('' 157 158 runHook preConfigure
+1
pkgs/build-support/go/package.nix
··· 86 86 inherit CGO_ENABLED enableParallelBuilding; 87 87 88 88 GO111MODULE = "off"; 89 + GOTOOLCHAIN = "local"; 89 90 GOFLAGS = lib.optionals (!allowGoReference) [ "-trimpath" ]; 90 91 91 92 GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);