From d879d9fae405131a605860260f034d0d4dcc86e8 Mon Sep 17 00:00:00 2001 From: RockAndSka
Date: Sun, 11 Mar 2018 20:48:34 +0100 Subject: [PATCH] Add writable /var/tmp to chroot --- nix/libstore/build.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index d68e8b2..ad08b3a 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc @@ -1849,6 +1849,11 @@ void DerivationGoal::startBuilder() createDirs(chrootTmpDir); chmod_(chrootTmpDir, 01777); + /* Create a writable /var/tmp in the chroot. */ + Path chrootVarTmpDir = chrootRootDir + "/var/tmp"; + createDirs(chrootVarTmpDir); + chmod_(chrootVarTmpDir, 01777); + /* Create a /etc/passwd with entries for the build user and the nobody account. The latter is kind of a hack to support Samba-in-QEMU. */ -- 2.7.4