Fil-C on Nix

Filnix wiki

mbrock/filnix

nanofil/nix/configurations.nix

A program check split into one derivation per nanofil configuration, so the configurations build in parallel instead of one after another.

import ./configurations.nix { inherit pkgs; } name configurations build

configurations maps a label to NANOFIL_OPT's value; build label opt is the derivation that checks that configuration, named "${name}-${label}". The result is the check itself: it builds when every configuration's derivation does, links each output under its label, and exposes them as passthru.configurations.

λpkgs
λname configurations build
let
14drvs=
builtins.mapAttrsbuild configurations
in
pkgs.runCommandname passthru.configurations = drvs;
mkdir $out
${pkgs.lib.concatStringspkgs.lib.mapAttrsToListlabel: drv: "ln -s ${drv} $out/${label}\n" drvs}