about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc2
-rw-r--r--src/libstore/globals.cc1
-rw-r--r--src/libstore/globals.hh6
3 files changed, 1 insertions, 8 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 466e3326d5f8..cbbd3aa39436 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1657,7 +1657,7 @@ void DerivationGoal::startBuilder()
 #if CHROOT_ENABLED
         /* Create a temporary directory in which we set up the chroot
            environment using bind-mounts. */
-        chrootRootDir = createTempDir(nixChrootsDir, "chroot-nix");
+        chrootRootDir = createTempDir("", "nix-chroot");
 
         /* Clean up the chroot directory automatically. */
         autoDelChroot = boost::shared_ptr<AutoDelete>(new AutoDelete(chrootRootDir));
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 27d75faec248..296cc4ac8029 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -16,7 +16,6 @@ string nixDBPath = "/UNINIT";
 string nixConfDir = "/UNINIT";
 string nixLibexecDir = "/UNINIT";
 string nixBinDir = "/UNINIT";
-string nixChrootsDir = "/UNINIT";
 
 bool keepFailed = false;
 bool keepGoing = false;
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 7e973025c978..b8e2bae66e65 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -35,12 +35,6 @@ extern string nixLibexecDir;
 /* nixBinDir is the directory where the main programs are stored. */
 extern string nixBinDir;
 
-/* nixChrootsDir is the directory where we create chroot environments
-   (when chroot builds are enabled).  We don't put these under /tmp to
-   prevent "rm -rf /tmp" from recursing into /nix/store via the bind
-   mounts in the chroots. */
-extern string nixChrootsDir;
-
 
 /* Misc. global flags. */