feat(builder): default to systems from inputs if exists

This commit is contained in:
technofab 2025-08-26 12:56:04 +02:00
parent c827a07997
commit 9ea903dde6
Signed by: technofab
SSH key fingerprint: SHA256:bV4h88OqS/AxjbPn66uUdvK9JsgIW4tv3vwJQ8tpMqQ

View file

@ -11,13 +11,23 @@
cellsFrom, cellsFrom,
cellBlocks, cellBlocks,
transformInputs ? system: i: i, transformInputs ? system: i: i,
systems ? [ ...
} @ args: let
# use passed systems if any, otherwise check if inputs contains systems and
# import them, otherwise use defaults
systems =
args.systems or
(
if builtins.hasAttr "systems" inputs
then import inputs.systems
else [
"x86_64-linux" "x86_64-linux"
"aarch64-linux"
"x86_64-darwin" "x86_64-darwin"
"aarch64-linux"
"aarch64-darwin" "aarch64-darwin"
], ]
}: let );
cells = res.output; cells = res.output;
loadOutputFor = system: let loadOutputFor = system: let