mirror of
https://github.com/NixOS/nix.git
synced 2025-11-11 04:56:01 +01:00
Merge pull request #13437 from NixOS/respect-transitive-locks
lockFlake(): When updating a lock, respect the input's lock file
This commit is contained in:
commit
485cbfc7f1
2 changed files with 41 additions and 7 deletions
|
|
@ -715,16 +715,12 @@ LockedFlake lockFlake(
|
|||
Finally cleanup([&]() { parents.pop_back(); });
|
||||
|
||||
/* Recursively process the inputs of this
|
||||
flake. Also, unless we already have this flake
|
||||
in the top-level lock file, use this flake's
|
||||
own lock file. */
|
||||
flake, using its own lock file. */
|
||||
nodePaths.emplace(childNode, inputFlake.path.parent());
|
||||
computeLocks(
|
||||
inputFlake.inputs, childNode, inputAttrPath,
|
||||
oldLock
|
||||
? std::dynamic_pointer_cast<const Node>(oldLock)
|
||||
: readLockFile(state.fetchSettings, inputFlake.lockFilePath()).root.get_ptr(),
|
||||
oldLock ? followsPrefix : inputAttrPath,
|
||||
readLockFile(state.fetchSettings, inputFlake.lockFilePath()).root.get_ptr(),
|
||||
inputAttrPath,
|
||||
inputFlake.path,
|
||||
false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue