From 4d9ea46f79170a9964ecf25e32b667813036a117 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Wed, 24 Aug 2022 07:58:12 +0800 Subject: [PATCH] Copy vendor directory instead of symlinking to it As pointed out in https://github.com/NixOS/nixpkgs/pull/188035#discussion_r953044264 this can be a source of errors when builders do things they shouldn't. I'm not really happy about this change as it causes quite a bit more IO for larger dependency graphs. --- builder/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/default.nix b/builder/default.nix index e499596..4ef5a1a 100644 --- a/builder/default.nix +++ b/builder/default.nix @@ -193,7 +193,7 @@ let cp ${pwd + "/go.sum"} source/go.sum cp ${pwd + "/tools.go"} source/tools.go cd source - ln -s ${vendorEnv} vendor + cp -r ${vendorEnv} vendor ${internal.install} ''; @@ -266,7 +266,7 @@ let cd "$modRoot" if [ -n "${vendorEnv}" ]; then rm -rf vendor - ln -s ${vendorEnv} vendor + cp -r ${vendorEnv} vendor fi runHook postConfigure