mirror of
https://github.com/NixOS/nix.git
synced 2025-12-10 11:01:03 +01:00
Lazily copy trees to the store
We now mount lazy accessors on top of /nix/store without materializing them, and only materialize them to the real store if needed (e.g. in the `derivation` primop).
This commit is contained in:
parent
c891554999
commit
febd28db87
14 changed files with 122 additions and 50 deletions
|
|
@ -267,11 +267,9 @@ EvalState::EvalState(
|
|||
auto accessor = getFSSourceAccessor();
|
||||
|
||||
auto realStoreDir = dirOf(store->toRealPath(StorePath::dummy));
|
||||
if (settings.pureEval || store->storeDir != realStoreDir) {
|
||||
accessor = settings.pureEval
|
||||
? storeFS.cast<SourceAccessor>()
|
||||
: makeUnionSourceAccessor({accessor, storeFS});
|
||||
}
|
||||
accessor = settings.pureEval
|
||||
? storeFS.cast<SourceAccessor>()
|
||||
: makeUnionSourceAccessor({accessor, storeFS});
|
||||
|
||||
/* Apply access control if needed. */
|
||||
if (settings.restrictEval || settings.pureEval)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue