diff options
author | Rob Vermaas <rob.vermaas@gmail.com> | 2011-11-21T15·19+0000 |
---|---|---|
committer | Rob Vermaas <rob.vermaas@gmail.com> | 2011-11-21T15·19+0000 |
commit | 4e1ea17052b4cc2445bc2ece2136f248112b4e45 (patch) | |
tree | 854f434275b8771538c0cc6c0fe35b9fecf0220c /src/libstore/build.cc | |
parent | 4de3e2a0db8d043324e9799ada181f7e73356908 (diff) |
nix: add /etc/hosts with localhost entry to chroot builds.
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index d12f41d66941..171c08913255 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1650,6 +1650,9 @@ void DerivationGoal::startBuilder() (format("nixbld:!:%1%:\n") % (buildUser.enabled() ? buildUser.getGID() : getgid())).str()); + /* Create /etc/hosts with localhost entry. */ + writeFile(chrootRootDir + "/etc/hosts", "127.0.0.1 localhost\n"); + /* Bind-mount a user-configurable set of directories from the host file system. The `/dev/pts' directory must be mounted separately so that newly-created pseudo-terminals show |