mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
call-flake.nix: allNodes.${key} -> allNodes.${key}.result
(cherry picked from commit 9de9410f29
)
This commit is contained in:
parent
9a969e29cf
commit
671364748c
1 changed files with 13 additions and 8 deletions
|
@ -48,7 +48,7 @@ let
|
|||
else if node.locked.type == "path" && builtins.substring 0 1 node.locked.path != "/" then
|
||||
parentNode.sourceInfo
|
||||
// {
|
||||
outPath = parentNode.outPath + ("/" + node.locked.path);
|
||||
outPath = parentNode.result.outPath + ("/" + node.locked.path);
|
||||
}
|
||||
else
|
||||
# FIXME: remove obsolete node.info.
|
||||
|
@ -61,7 +61,9 @@ let
|
|||
|
||||
flake = import (outPath + "/flake.nix");
|
||||
|
||||
inputs = mapAttrs (inputName: inputSpec: allNodes.${resolveInput inputSpec}) (node.inputs or { });
|
||||
inputs = mapAttrs (inputName: inputSpec: allNodes.${resolveInput inputSpec}.result) (
|
||||
node.inputs or { }
|
||||
);
|
||||
|
||||
outputs = flake.outputs (inputs // { self = result; });
|
||||
|
||||
|
@ -84,12 +86,15 @@ let
|
|||
};
|
||||
|
||||
in
|
||||
{
|
||||
result =
|
||||
if node.flake or true then
|
||||
assert builtins.isFunction flake.outputs;
|
||||
result
|
||||
else
|
||||
sourceInfo
|
||||
sourceInfo;
|
||||
}
|
||||
) lockFile.nodes;
|
||||
|
||||
in
|
||||
allNodes.${lockFile.root}
|
||||
allNodes.${lockFile.root}.result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue