From bbd6379ad7a3bfb3df3b96e6a724a155c57b8329 Mon Sep 17 00:00:00 2001 From: Stewart Butler Date: Tue, 19 Sep 2023 16:33:01 -0700 Subject: [PATCH] Add support for Go 1.21 Go 1.21 added a requirement for a 'go.env' file. Without that file, Go will throw an error like: ``` Error in fail: failed to fetch org_golang_google_grpc_cmd_protoc_gen_go_grpc: fetch_repo: google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0: GOPROXY list is not the empty string, but contains no entries ``` This commit adds it to the SDK exposed by rules_nixpkgs so that it is compatible with rules_go. See: - https://github.com/bazelbuild/rules_go/issues/3665 - https://github.com/bazelbuild/rules_go/pull/3666 --- toolchains/go/go.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchains/go/go.nix b/toolchains/go/go.nix index f559c356a..b21eeb322 100644 --- a/toolchains/go/go.nix +++ b/toolchains/go/go.nix @@ -21,7 +21,7 @@ let paths = [ goAttr ]; postBuild = '' touch $out/ROOT - ln -s $out/share/go/{api,doc,lib,misc,pkg,src} $out/ + ln -s $out/share/go/{api,doc,lib,misc,pkg,src,go.env} $out/ ''; } // { version = getVersion goAttr;