mirror of
https://github.com/NixOS/nix.git
synced 2025-11-30 22:20:59 +01:00
Improve subflake handling
Relative 'path:' inputs are now handled correctly in call-flake.nix. This does require the lock file to record what the 'parent' is relative to which a node's source should be fetched.
This commit is contained in:
parent
0d14ffbcba
commit
5c2603d9c7
4 changed files with 107 additions and 53 deletions
|
|
@ -33,11 +33,16 @@ struct LockedNode : Node
|
|||
FlakeRef lockedRef, originalRef;
|
||||
bool isFlake = true;
|
||||
|
||||
/* The node relative to which relative source paths
|
||||
(e.g. 'path:../foo') are interpreted. */
|
||||
std::optional<InputPath> parentPath;
|
||||
|
||||
LockedNode(
|
||||
const FlakeRef & lockedRef,
|
||||
const FlakeRef & originalRef,
|
||||
bool isFlake = true)
|
||||
: lockedRef(lockedRef), originalRef(originalRef), isFlake(isFlake)
|
||||
bool isFlake = true,
|
||||
std::optional<InputPath> parentPath = {})
|
||||
: lockedRef(lockedRef), originalRef(originalRef), isFlake(isFlake), parentPath(parentPath)
|
||||
{ }
|
||||
|
||||
LockedNode(const nlohmann::json & json);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue