depot/packages/part.nix

19 lines
569 B
Nix
Raw Normal View History

2022-10-17 15:54:48 +03:00
{ lib, ... }:
2022-07-31 16:09:40 +03:00
let
filters = import ./system-filter.nix;
2022-10-17 15:38:55 +03:00
doFilter' = system: filterSet: lib.filterAttrs (name: _:
2022-07-31 16:09:40 +03:00
filterSet ? "${name}" -> builtins.elem system filterSet."${name}"
2022-10-17 15:38:55 +03:00
);
2022-07-31 16:09:40 +03:00
in {
imports = [
./projects.nix
./patched-inputs.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;
};
}