Skip to content

Commit

Permalink
go: stop setting GOPATH
Browse files Browse the repository at this point in the history
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
```

(cherry picked from commit a1e13f6)
  • Loading branch information
mmlb authored and zowoq committed Jun 18, 2020
1 parent 7bb2e7e commit 6cd67ec
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions pkgs/development/compilers/go/1.14.nix
Expand Up @@ -230,8 +230,6 @@ stdenv.mkDerivation rec {
runHook postInstall
'';

setupHook = ./setup-hook.sh;

disallowedReferences = [ goBootstrap ];

meta = with stdenv.lib; {
Expand Down
2 changes: 0 additions & 2 deletions pkgs/development/compilers/go/1.4.nix
Expand Up @@ -151,8 +151,6 @@ stdenv.mkDerivation rec {
./all.bash
'';

setupHook = ./setup-hook.sh;

meta = with stdenv.lib; {
branch = "1.4";
homepage = http://golang.org/;
Expand Down
5 changes: 0 additions & 5 deletions pkgs/development/compilers/go/setup-hook.sh

This file was deleted.

0 comments on commit 6cd67ec

Please sign in to comment.