1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

* Put building in the store API.

This commit is contained in:
Eelco Dolstra 2006-11-30 18:02:04 +00:00
parent e2ef5e07fd
commit 6ecb840fd1
11 changed files with 31 additions and 48 deletions

View file

@ -1,7 +1,6 @@
#include "profiles.hh"
#include "names.hh"
#include "globals.hh"
#include "build.hh"
#include "misc.hh"
#include "gc.hh"
#include "shared.hh"
@ -152,7 +151,7 @@ static void createUserEnv(EvalState & state, const DrvInfos & elems,
drvsToBuild.insert(i->queryDrvPath(state));
debug(format("building user environment dependencies"));
buildDerivations(drvsToBuild);
store->buildDerivations(drvsToBuild);
/* Get the environment builder expression. */
Expr envBuilder = parseExprFromFile(state,
@ -184,7 +183,7 @@ static void createUserEnv(EvalState & state, const DrvInfos & elems,
/* This is only necessary when installing store paths, e.g.,
`nix-env -i /nix/store/abcd...-foo'. */
addTempRoot(i->queryOutPath(state));
ensurePath(i->queryOutPath(state));
store->ensurePath(i->queryOutPath(state));
references.insert(i->queryOutPath(state));
if (drvPath != "") references.insert(drvPath);
@ -212,7 +211,7 @@ static void createUserEnv(EvalState & state, const DrvInfos & elems,
/* Realise the resulting store expression. */
debug(format("building user environment"));
buildDerivations(singleton<PathSet>(topLevelDrv.queryDrvPath(state)));
store->buildDerivations(singleton<PathSet>(topLevelDrv.queryDrvPath(state)));
/* Switch the current user environment to the output path. */
debug(format("switching to new user environment"));