fix(loader): use correct output for cell param

This commit is contained in:
technofab 2025-08-26 12:55:42 +02:00
parent 9f20f8c94b
commit c827a07997
No known key found for this signature in database

View file

@ -9,6 +9,7 @@
createCellBlockLoader = { createCellBlockLoader = {
inputs, inputs,
system, system,
cell,
cells, cells,
transformInputs, transformInputs,
}: let }: let
@ -20,7 +21,7 @@
isDir = l.pathExists blockP.dir; isDir = l.pathExists blockP.dir;
signature = let signature = let
cell = cells // {__cr = [cellName cellBlock.name];}; cell = cell // {__cr = [cellName cellBlock.name];};
additionalInputs = additionalInputs =
if l.pathExists cellP.flake if l.pathExists cellP.flake
then then
@ -125,11 +126,12 @@
transformInputs, transformInputs,
}: let }: let
inherit (utils) unique accumulate; inherit (utils) unique accumulate;
loadCellBlock = createCellBlockLoader {inherit inputs system cells transformInputs;};
loadCell = cellName: let loadCell = cellName: let
cell = res.output;
cellP = paths.cellPath cellsFrom cellName; cellP = paths.cellPath cellsFrom cellName;
cellBlocks' = (unique cellBlocks).result; cellBlocks' = (unique cellBlocks).result;
loadCellBlock = createCellBlockLoader {inherit inputs system cells cell transformInputs;};
res = accumulate (l.map (loadCellBlock cellName cellP) cellBlocks'); res = accumulate (l.map (loadCellBlock cellName cellP) cellBlocks');
in [ in [
{${cellName} = res.output;} {${cellName} = res.output;}