1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-14 06:22:42 +01:00

Mount flake input source accessors on top of storeFS

This way, we don't need the PathDisplaySourceAccessor source accessor
hack, since error messages are produced directly by the original
source accessor.

In fact, we don't even need to copy the inputs to the store at all, so
this gets us very close to lazy trees. We just need to know the store
path so that requires hashing the entire input, which isn't lazy. But
the next step will be to use a virtual store path that gets rewritten
to the actual store path only when needed.
This commit is contained in:
Eelco Dolstra 2025-04-01 17:29:15 +02:00
parent fcddf4afe3
commit 73b1754816
14 changed files with 66 additions and 117 deletions

View file

@ -37,6 +37,7 @@ class StorePath;
struct SingleDerivedPath;
enum RepairFlag : bool;
struct MemorySourceAccessor;
struct MountedSourceAccessor;
namespace eval_cache {
class EvalCache;
}
@ -262,15 +263,10 @@ public:
/** `"unknown"` */
Value vStringUnknown;
using StorePathAccessors = std::map<CanonPath, ref<SourceAccessor>>;
/**
* A map back to the original `SourceAccessor`s used to produce
* store paths. We keep track of this to produce error messages
* that refer to the original flakerefs.
* FIXME: use Sync.
* The accessor corresponding to `store`.
*/
ref<StorePathAccessors> storePathAccessors;
const ref<MountedSourceAccessor> storeFS;
/**
* The accessor for the root filesystem.