depot/packages/part.nix
2024-07-16 02:17:23 +02:00

20 lines
601 B
Nix

{ lib, ... }:
let
filters = import ./system-filter.nix;
doFilter' = system: filterSet: lib.filterAttrs (name: _:
filterSet ? "${name}" -> builtins.elem system filterSet."${name}"
);
in {
imports = [
./projects.nix
./patched-inputs.nix
./catalog
./shadows.nix
];
perSystem = { pkgs, self', system, ... }: let
patched-derivations = import ./patched-derivations.nix (pkgs // { flakePackages = self'.packages; });
in {
_module.args.filters = filters // { doFilter = doFilter' system; };
packages = doFilter' system filters.packages patched-derivations;
};
}