mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
call-flake.nix: allNodes.${key} -> allNodes.${key}.result
This commit is contained in:
parent
674375b021
commit
9de9410f29
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
|
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
|
||||||
if node.flake or true then
|
{
|
||||||
assert builtins.isFunction flake.outputs;
|
result =
|
||||||
result
|
if node.flake or true then
|
||||||
else
|
assert builtins.isFunction flake.outputs;
|
||||||
sourceInfo
|
result
|
||||||
|
else
|
||||||
|
sourceInfo;
|
||||||
|
}
|
||||||
) lockFile.nodes;
|
) lockFile.nodes;
|
||||||
|
|
||||||
in
|
in
|
||||||
allNodes.${lockFile.root}
|
allNodes.${lockFile.root}.result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue