* 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user