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 authored and avdv committed Nov 3, 2023
1 parent 3e21df2 commit e83f344
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 e83f344

Please sign in to comment.