summaryrefslogtreecommitdiffstats
path: root/pkgs/development/go-modules
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2020-10-22 22:50:46 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2020-11-06 13:55:46 +1000
commit66d424514f2dff8968e41dfd70c8836f995fb7be (patch)
tree30550c5493f606c4b2f889b67162189adadc3ba3 /pkgs/development/go-modules
parentd1febbeb1bfc6a0b2a7be5112e2c1f255a07cb15 (diff)
buildGoModule: copy vendor instead of symlinking
Allow the second phase to modify the contents of the vendor directory.
Diffstat (limited to 'pkgs/development/go-modules')
-rw-r--r--pkgs/development/go-modules/generic/default.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix
index 1549c83234a8..7180ab7bf967 100644
--- a/pkgs/development/go-modules/generic/default.nix
+++ b/pkgs/development/go-modules/generic/default.nix
@@ -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
'';