Skip to content

Commit

Permalink
Provide /var/run/nscd/socket in the sandbox
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
edolstra committed Jan 2, 2017
1 parent c4f4eef commit b6b142b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstore/build.cc
Expand Up @@ -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;
Expand Down

0 comments on commit b6b142b

Please sign in to comment.