From b6b142b4b10552f2a2a8c904487bbd196d35a5c1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 2 Jan 2017 14:46:37 +0100 Subject: [PATCH] Provide /var/run/nscd/socket in the sandbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise sandbox builds can fail, e.g. $ NIX_REMOTE=local?root=/tmp/nix nix-build '' -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) --- src/libstore/build.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index eaa9128d8..c46b7cd64 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;