go: stop setting GOPATH

The compiler does not need it anymore, has not needed it for many years
iirc. This just goes in and pollutes the environment overriding the
users GOPATH and causing grief.

Go even warns about it itself, without vs with this commit:

```sh
~> go env GOPATH
/home/manny/go
~> nix-shell -p go
~> go env GOPATH
warning: GOPATH set to GOROOT (/nix/store/gvw1mfpdrk7i82884yhxf9lf5j3c12zm-go-1.14.1/share/go) has no effect
/nix/store/gvw1mfpdrk7i82884yhxf9lf5j3c12zm-go-1.14.1/share/go
~> exit
~> nix-shell -I nixpkgs=cloned/NixOS/nixpkgs -p go
~> go env GOPATH
/home/manny/go
~> exit
```
This commit is contained in:
Manuel Mendez 2020-05-13 14:34:10 -04:00 committed by Jörg Thalheim
parent ee2922a4b4
commit a1e13f6140
No known key found for this signature in database
GPG Key ID: 003F2096411B5F92
3 changed files with 0 additions and 9 deletions

View File

@ -229,8 +229,6 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
setupHook = ./setup-hook.sh;
disallowedReferences = [ goBootstrap ];
meta = with stdenv.lib; {

View File

@ -151,8 +151,6 @@ stdenv.mkDerivation rec {
./all.bash
'';
setupHook = ./setup-hook.sh;
meta = with stdenv.lib; {
branch = "1.4";
homepage = "http://golang.org/";

View File

@ -1,5 +0,0 @@
addToGoPath() {
addToSearchPath GOPATH $1/share/go
}
addEnvHooks "$targetOffset" addToGoPath