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 GOSUMDB=off
export GOPROXY=off export GOPROXY=off
cd "$modRoot" cd "$modRoot"
if [ -n "${go-modules}" ]; then '' + lib.optionalString (go-modules != "") ''
rm -rf vendor rm -rf vendor
ln -s ${go-modules} vendor cp -r --reflink=auto ${go-modules} vendor
fi '' + ''
runHook postConfigure runHook postConfigure
''; '';