1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-01 06:31:00 +01:00

Implement alternative to lazy generations:

* only the last generation can be lazy
* depend on the '--lazy-generation' flag to be set
This commit is contained in:
Christian Theune 2015-05-19 20:03:36 +02:00
parent 3d83188702
commit ea39c98d41
6 changed files with 39 additions and 21 deletions

View file

@ -28,7 +28,7 @@ DrvInfos queryInstalled(EvalState & state, const Path & userEnv)
bool createUserEnv(EvalState & state, DrvInfos & elems,
const Path & profile, bool keepDerivations,
const string & lockToken)
const string & lockToken, bool lazyGeneration)
{
/* Build the components in the user environment, if they don't
exist already. */
@ -141,7 +141,7 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
}
debug(format("switching to new user environment"));
Path generation = createGeneration(profile, topLevelOut);
Path generation = createGeneration(profile, topLevelOut, lazyGeneration);
switchLink(profile, generation);
return true;