aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-03-24 11:15:45 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-03-24 11:15:45 +0100
commit6f0c6e20e03bc82fcf0d2198cf81fa2cf25c2f6c (patch)
tree0037f8a7f72bb2c0fd5cb89e8c37c03d1c8c8ebf /src
parentb005e63ccf387add426aa9941ab9f5770307fe33 (diff)
Don't rely on __noChroot for corepkgs
This doesn't work anymore if the "strict" chroot mode is enabled. Instead, add Nix's store path as a dependency. This ensures that its closure is present in the chroot.
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/primops.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 9d18dc54e..9723cdfd2 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -1507,12 +1507,15 @@ void EvalState::createBaseEnv()
mkInt(v, time(0));
addConstant("__currentTime", v);
- mkString(v, settings.thisSystem.c_str());
+ mkString(v, settings.thisSystem);
addConstant("__currentSystem", v);
- mkString(v, nixVersion.c_str());
+ mkString(v, nixVersion);
addConstant("__nixVersion", v);
+ mkString(v, settings.nixStore);
+ addConstant("__storeDir", v);
+
/* Language version. This should be increased every time a new
language feature gets added. It's not necessary to increase it
when primops get added, because you can just use `builtins ?