1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-29 21:50:58 +01:00

Set lockedRef correctly

This commit is contained in:
Eelco Dolstra 2022-05-20 15:47:08 +02:00
parent 885a09c3fa
commit ad4b7669db
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 12 additions and 3 deletions

View file

@ -203,6 +203,7 @@ static Flake readFlake(
EvalState & state,
const FlakeRef & originalRef,
const FlakeRef & resolvedRef,
const FlakeRef & lockedRef,
InputAccessor & accessor,
const InputPath & lockRootPath)
{
@ -220,7 +221,7 @@ static Flake readFlake(
Flake flake {
.originalRef = originalRef,
.resolvedRef = resolvedRef,
.lockedRef = resolvedRef, // FIXME
.lockedRef = lockedRef,
.path = flakePath,
};
@ -319,9 +320,9 @@ static Flake getFlake(
resolvedRef = originalRef.resolve(state.store);
}
auto [accessor, input] = resolvedRef.input.lazyFetch(state.store);
auto [accessor, lockedRef] = resolvedRef.lazyFetch(state.store);
return readFlake(state, originalRef, resolvedRef, state.registerAccessor(accessor), lockRootPath);
return readFlake(state, originalRef, resolvedRef, lockedRef, state.registerAccessor(accessor), lockRootPath);
}
Flake getFlake(EvalState & state, const FlakeRef & originalRef, bool allowLookup, FlakeCache & flakeCache)