mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Improve setting the default chroot dirs
This commit is contained in:
parent
fd89f97be9
commit
5114a07d95
3 changed files with 7 additions and 9 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue