about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-01-02T13·46+0100
committerEelco Dolstra <edolstra@gmail.com>2017-01-02T13·46+0100
commitb6b142b4b10552f2a2a8c904487bbd196d35a5c1 (patch)
treea3792806f0606e018fb1f4405ed44681c7016a1c /src/libstore
parentc4f4eef915450406e94410a2b023d72681102db9 (diff)
Provide /var/run/nscd/socket in the sandbox
Otherwise sandbox builds can fail, e.g.

  $ NIX_REMOTE=local?root=/tmp/nix nix-build '<nixpkgs>' -A hello --option build-use-substitutes false
  ...
  downloading ‘http://ftpmirror.gnu.org/bash/bash-4.3-patches/bash43-047’...
  error: unable to download ‘http://ftpmirror.gnu.org/bash/bash-4.3-patches/bash43-047’: Couldn't resolve host name (6)
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index eaa9128d8f37..c46b7cd641c4 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2340,6 +2340,7 @@ void DerivationGoal::runChild()
                 ss.push_back("/etc/nsswitch.conf");
                 ss.push_back("/etc/services");
                 ss.push_back("/etc/hosts");
+                ss.push_back("/var/run/nscd/socket");
             }
 
             for (auto & i : ss) dirsInChroot[i] = i;