goPackages.tools: add setup-hook for setting GOTOOLDIR
This commit is contained in:
parent
e1a392e031
commit
b080efe4dc
1
pkgs/development/go-modules/tools/setup-hook.sh
Normal file
1
pkgs/development/go-modules/tools/setup-hook.sh
Normal file
@ -0,0 +1 @@
|
||||
export GOTOOLDIR=@bin@/bin
|
@ -133,6 +133,14 @@ let
|
||||
# Do not copy this without a good reason for enabling
|
||||
# In this case tools is heavily coupled with go itself and embeds paths.
|
||||
allowGoReference = true;
|
||||
|
||||
# Set GOTOOLDIR for derivations adding this to buildInputs
|
||||
postInstall = ''
|
||||
mkdir -p $bin/nix-support
|
||||
substituteAll ${../development/go-modules/tools/setup-hook.sh} $bin/nix-support/setup-hook.tmp
|
||||
cat $bin/nix-support/setup-hook.tmp >> $bin/nix-support/setup-hook
|
||||
rm $bin/nix-support/setup-hook.tmp
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user