You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
765 B
28 lines
765 B
let
|
|
field = x:
|
|
if (x == null || x == [ ] || x == "") then "-"
|
|
else if (builtins.isInt x) then (builtins.toString x)
|
|
else if (builtins.isList x) then (builtins.concatStringsSep "," x)
|
|
else x;
|
|
|
|
mkBuildMachine =
|
|
{ uri ? null
|
|
, systems ? null
|
|
, sshKey ? null
|
|
, maxJobs ? null
|
|
, speedFactor ? null
|
|
, supportedFeatures ? null
|
|
, mandatoryFeatures ? null
|
|
, publicHostKey ? null
|
|
}: ''
|
|
${field uri} ${field systems} ${field sshKey} ${field maxJobs} ${field speedFactor} ${field supportedFeatures} ${field mandatoryFeatures} ${field publicHostKey}
|
|
'';
|
|
|
|
mkBuildMachinesFile = x: builtins.toFile "machines" (
|
|
builtins.concatStringsSep "\n" (
|
|
map (mkBuildMachine) x
|
|
)
|
|
);
|
|
|
|
in
|
|
mkBuildMachinesFile
|
|
|