@@ -625,12 +625,12 @@ LockedFlake lockFlake(
625625
626626 /* Get the input flake, resolve 'path:./...'
627627 flakerefs relative to the parent flake. */
628- auto getInputFlake = [&]()
628+ auto getInputFlake = [&](const FlakeRef & ref )
629629 {
630630 if (auto resolvedPath = resolveRelativePath ()) {
631- return readFlake (state, *input. ref , *input. ref , *input. ref , *resolvedPath, inputAttrPath);
631+ return readFlake (state, ref, ref, ref, *resolvedPath, inputAttrPath);
632632 } else {
633- return getFlake (state, *input. ref , useRegistries, flakeCache, inputAttrPath);
633+ return getFlake (state, ref, useRegistries, flakeCache, inputAttrPath);
634634 }
635635 };
636636
@@ -711,7 +711,7 @@ LockedFlake lockFlake(
711711 }
712712
713713 if (mustRefetch) {
714- auto inputFlake = getInputFlake ();
714+ auto inputFlake = getInputFlake (oldLock-> lockedRef );
715715 nodePaths.emplace (childNode, inputFlake.path .parent ());
716716 computeLocks (inputFlake.inputs , childNode, inputAttrPath, oldLock, followsPrefix,
717717 inputFlake.path , false );
@@ -739,7 +739,7 @@ LockedFlake lockFlake(
739739 auto ref = (input2.ref && explicitCliOverrides.contains (inputAttrPath)) ? *input2.ref : *input.ref ;
740740
741741 if (input.isFlake ) {
742- auto inputFlake = getInputFlake ();
742+ auto inputFlake = getInputFlake (*input. ref );
743743
744744 auto childNode = make_ref<LockedNode>(
745745 inputFlake.lockedRef ,
0 commit comments