1
0
Fork 0
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:
Robert Hensing 2025-04-15 09:10:18 +02:00 committed by Mergify
parent 9a969e29cf
commit 671364748c

View file

@ -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
if node.flake or true then
assert builtins.isFunction flake.outputs;
result
else
sourceInfo
{
result =
if node.flake or true then
assert builtins.isFunction flake.outputs;
result
else
sourceInfo;
}
) lockFile.nodes;
in
allNodes.${lockFile.root}
allNodes.${lockFile.root}.result