From a1e13f6140a568b73c1c36bb9ef79d7876ccaae3 Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Wed, 13 May 2020 14:34:10 -0400 Subject: [PATCH] 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 ``` --- pkgs/development/compilers/go/1.14.nix | 2 -- pkgs/development/compilers/go/1.4.nix | 2 -- pkgs/development/compilers/go/setup-hook.sh | 5 ----- 3 files changed, 9 deletions(-) delete mode 100644 pkgs/development/compilers/go/setup-hook.sh diff --git a/pkgs/development/compilers/go/1.14.nix b/pkgs/development/compilers/go/1.14.nix index 9ee5b6fa6242..4d83e12b3b2a 100644 --- a/pkgs/development/compilers/go/1.14.nix +++ b/pkgs/development/compilers/go/1.14.nix @@ -229,8 +229,6 @@ stdenv.mkDerivation rec { runHook postInstall ''; - setupHook = ./setup-hook.sh; - disallowedReferences = [ goBootstrap ]; meta = with stdenv.lib; { diff --git a/pkgs/development/compilers/go/1.4.nix b/pkgs/development/compilers/go/1.4.nix index fc3fb0ad0e5a..af125d60ed0a 100644 --- a/pkgs/development/compilers/go/1.4.nix +++ b/pkgs/development/compilers/go/1.4.nix @@ -151,8 +151,6 @@ stdenv.mkDerivation rec { ./all.bash ''; - setupHook = ./setup-hook.sh; - meta = with stdenv.lib; { branch = "1.4"; homepage = "http://golang.org/"; diff --git a/pkgs/development/compilers/go/setup-hook.sh b/pkgs/development/compilers/go/setup-hook.sh deleted file mode 100644 index 7dce15eeb102..000000000000 --- a/pkgs/development/compilers/go/setup-hook.sh +++ /dev/null @@ -1,5 +0,0 @@ -addToGoPath() { - addToSearchPath GOPATH $1/share/go -} - -addEnvHooks "$targetOffset" addToGoPath