summaryrefslogtreecommitdiff
path: root/nix/libstore/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libstore/build.cc')
-rw-r--r--nix/libstore/build.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index e72a0165987..85be95d557f 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -2826,11 +2826,11 @@ void DerivationGoal::startBuilder()
2826 } 2826 }
2827 for (auto & file : files) { 2827 for (auto & file : files) {
2828 if (pathExists(file)) { 2828 if (pathExists(file)) {
2829 /* On Guix System, /etc/services is a symlink; likewise, 2829 /* Copy files into chroot instead of bind-mounting in case
2830 on systemd-based system, /etc/resolv.conf is a symlink. 2830 they are symbolic links that won't resolve on the
2831 Dereference them. */ 2831 inside. */
2832 ctx.filesInChroot[file] = canonPath(file, true); 2832 string contents = readFile(file);
2833 ctx.readOnlyFilesInChroot.insert(file); 2833 writeFile(chrootRootDir + file, contents);
2834 } 2834 }
2835 } 2835 }
2836 } 2836 }