goPackages.tools: add setup-hook for setting GOTOOLDIR

+9
+1
pkgs/development/go-modules/tools/setup-hook.sh
··· 1 + export GOTOOLDIR=@bin@/bin
+8
pkgs/top-level/go-packages.nix
··· 133 133 # Do not copy this without a good reason for enabling 134 134 # In this case tools is heavily coupled with go itself and embeds paths. 135 135 allowGoReference = true; 136 + 137 + # Set GOTOOLDIR for derivations adding this to buildInputs 138 + postInstall = '' 139 + mkdir -p $bin/nix-support 140 + substituteAll ${../development/go-modules/tools/setup-hook.sh} $bin/nix-support/setup-hook.tmp 141 + cat $bin/nix-support/setup-hook.tmp >> $bin/nix-support/setup-hook 142 + rm $bin/nix-support/setup-hook.tmp 143 + ''; 136 144 }; 137 145 138 146