labs/tidepool/src/packages/default.nix

51 lines
902 B
Nix
Raw Normal View History

{
lib,
config,
}: let
lib' = config.lib;
2024-06-13 10:22:57 -07:00
doubles = lib'.systems.doubles.all;
2024-06-14 01:26:16 -07:00
generic = config.packages.generic;
getPackages = system:
builtins.mapAttrs
(
namespace: packages:
lib.attrs.filter
(name: package: builtins.elem system package.meta.platforms)
packages
);
targeted = lib.attrs.generate lib'.systems.doubles.all (system:
getPackages system generic
// {
cross = lib.attrs.generate doubles (
host: getPackages host generic
);
});
in {
includes = [
2024-06-14 04:47:54 -07:00
./aux/foundation.nix
];
options = {
2024-06-14 01:26:16 -07:00
packages = {
generic = lib.options.create {
type = lib'.types.packages.generic;
default.value = {};
};
targeted = lib.options.create {
type = lib'.types.packages.targeted;
};
};
};
2024-06-13 10:22:57 -07:00
config = {
2024-06-14 01:26:16 -07:00
packages = {
inherit targeted;
};
2024-06-13 10:22:57 -07:00
};
}