mirror of
https://github.com/NixOS/nix
synced 2025-06-29 19:03:16 +02:00
Store a ref to InputAccessor in SourcePath
This commit is contained in:
parent
72dffd6c6c
commit
a18b3c665a
14 changed files with 44 additions and 31 deletions
|
@ -186,9 +186,11 @@ static void fetchTree(
|
|||
if (params.returnPath) {
|
||||
auto [accessor, input2] = input.lazyFetch(state.store);
|
||||
|
||||
state.registerAccessor(accessor);
|
||||
|
||||
emitTreeAttrs(
|
||||
state,
|
||||
{ state.registerAccessor(accessor), CanonPath::root },
|
||||
{ accessor, CanonPath::root },
|
||||
input2,
|
||||
v,
|
||||
params.emptyRevFallback,
|
||||
|
|
|
@ -60,9 +60,11 @@ static void prim_patch(EvalState & state, const PosIdx pos, Value * * args, Valu
|
|||
if (!src->path.isRoot())
|
||||
throw UnimplementedError("applying patches to a non-root path ('%s') is not yet supported", src->path);
|
||||
|
||||
auto accessor = makePatchingInputAccessor(ref(src->accessor.shared_from_this()), patches);
|
||||
auto accessor = makePatchingInputAccessor(src->accessor, patches);
|
||||
|
||||
v.mkPath(SourcePath { state.registerAccessor(accessor), src->path });
|
||||
state.registerAccessor(accessor);
|
||||
|
||||
v.mkPath(SourcePath{accessor, src->path});
|
||||
}
|
||||
|
||||
static RegisterPrimOp primop_patch({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue