aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 1c510fa7d..90bcccd24 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1784,9 +1784,14 @@ void DerivationGoal::startBuilder()
}
if (useChroot) {
+
+ string defaultChrootDirs;
+ if (isInStore(BASH_PATH))
+ defaultChrootDirs = "/bin/sh=" BASH_PATH;
+
/* Allow a user-configurable set of directories from the
host file system. */
- PathSet dirs = tokenizeString<StringSet>(settings.get("build-chroot-dirs", string(DEFAULT_CHROOT_DIRS)));
+ PathSet dirs = tokenizeString<StringSet>(settings.get("build-chroot-dirs", defaultChrootDirs));
PathSet dirs2 = tokenizeString<StringSet>(settings.get("build-extra-chroot-dirs", string("")));
dirs.insert(dirs2.begin(), dirs2.end());