Skip to content

Commit

Permalink
Add support for Go 1.21
Browse files Browse the repository at this point in the history
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/[email protected]: 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:
- bazel-contrib/rules_go#3665
- bazel-contrib/rules_go#3666
  • Loading branch information
stewartbutler committed Sep 20, 2023
1 parent 4306671 commit bbd6379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toolchains/go/go.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bbd6379

Please sign in to comment.