diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc index 06136579e..33d253eee 100644 --- a/src/libexpr/flake/flake.cc +++ b/src/libexpr/flake/flake.cc @@ -480,11 +480,16 @@ LockedFlake lockFlake( } } + LockParent newParent { + .path = inputPath, + .absolute = false + }; + computeLocks( mustRefetch ? getFlake(state, oldLock->lockedRef, false, flakeCache).inputs : fakeInputs, - childNode, inputPath, oldLock, parent, parentPath); + childNode, inputPath, oldLock, newParent, parentPath); } else { /* We need to create a new lock file entry. So fetch diff --git a/tests/flakes.sh b/tests/flakes.sh index 9e10322b9..20966ab2a 100644 --- a/tests/flakes.sh +++ b/tests/flakes.sh @@ -722,6 +722,7 @@ cat > $flakeFollowsB/flake.nix < $flakeFollowsC/flake.nix <