1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

* The environment variable NIX_ROOT can now be set to execute Nix in a

chroot() environment.
* A operation `--validpath' to register path validity.  Useful for
  bootstrapping in a pure Nix environment.
* Safety checks: ensure that files involved in store operations are in
  the store.
This commit is contained in:
Eelco Dolstra 2004-02-14 21:44:18 +00:00
parent 6f5a5ea5ea
commit 76c0e85929
4 changed files with 70 additions and 12 deletions

View file

@ -22,6 +22,13 @@ void sigintHandler(int signo)
processor. */
static void initAndRun(int argc, char * * argv)
{
char * root = getenv("NIX_ROOT");
if (root) {
if (chroot(root) != 0)
throw SysError(format("changing root to `%1%'") % root);
}
/* Setup Nix paths. */
nixStore = NIX_STORE_DIR;
nixDataDir = NIX_DATA_DIR;