buildGoModule: copy vendor instead of symlinking

Allow the second phase to modify the contents of the vendor directory.
This commit is contained in:
zowoq 2020-10-22 22:50:46 +10:00
parent d1febbeb1b
commit 66d424514f

View file

@ -136,10 +136,10 @@ let
export GOSUMDB=off
export GOPROXY=off
cd "$modRoot"
if [ -n "${go-modules}" ]; then
rm -rf vendor
ln -s ${go-modules} vendor
fi
'' + lib.optionalString (go-modules != "") ''
rm -rf vendor
cp -r --reflink=auto ${go-modules} vendor
'' + ''
runHook postConfigure
'';