devos/nix/ci.nix
Timothy DeHerrera 1cbbb78aba
ci: don't build legacyPackages
`legacyPackages` are not filtered by system and so will contain invalid
derivations. If something in legacyPackages should be explicitly built
add it to the `checks` output.
2021-03-26 18:29:48 -06:00

31 lines
695 B
Nix

let
inherit (default.inputs.nixos) lib;
default = (import "${../.}/compat").defaultNix;
ciSystems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
];
filterSystems = lib.filterAttrs
(system: _: lib.elem system ciSystems);
recurseIntoAttrsRecursive = lib.mapAttrs (_: v:
if lib.isAttrs v
then recurseIntoAttrsRecursive (lib.recurseIntoAttrs v)
else v
);
systemOutputs = lib.filterAttrs
(name: set: lib.isAttrs set
&& lib.any
(system: set ? ${system} && name != "legacyPackages")
ciSystems
)
default.outputs;
ciDrvs = lib.mapAttrs (_: system: filterSystems system) systemOutputs;
in
recurseIntoAttrsRecursive ciDrvs