1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51: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 else if node.locked.type == "path" && builtins.substring 0 1 node.locked.path != "/" then
parentNode.sourceInfo parentNode.sourceInfo
// { // {
outPath = parentNode.outPath + ("/" + node.locked.path); outPath = parentNode.result.outPath + ("/" + node.locked.path);
} }
else else
# FIXME: remove obsolete node.info. # FIXME: remove obsolete node.info.
@ -61,7 +61,9 @@ let
flake = import (outPath + "/flake.nix"); 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; }); outputs = flake.outputs (inputs // { self = result; });
@ -84,12 +86,15 @@ let
}; };
in in
{
result =
if node.flake or true then if node.flake or true then
assert builtins.isFunction flake.outputs; assert builtins.isFunction flake.outputs;
result result
else else
sourceInfo sourceInfo;
}
) lockFile.nodes; ) lockFile.nodes;
in in
allNodes.${lockFile.root} allNodes.${lockFile.root}.result