11.stylix/stylix/meta.nix
Daniel Thwaites 64b4369b6b
doc: display module maintainers (#1010)
As promised at
https://github.com/danth/stylix/pull/977#pullrequestreview-2683388232,
this lists the maintainers for each module on its page in the docs.

This includes some fixes to `stylix/meta.nix`: swapped the order of
arguments to `mapAttrs`, and added an `import` to load the meta file
rather than returning its path.
2025-03-20 16:05:36 +00:00

29 lines
592 B
Nix

{
pkgs,
lib,
inputs,
...
}:
builtins.mapAttrs
(
_: value:
if (builtins.typeOf value == "lambda") then
(value {
inherit pkgs;
lib = pkgs.lib.extend (
_: prev: {
maintainers = lib.attrsets.unionOfDisjoint prev.maintainers (import ./maintainers.nix);
}
);
})
else
value
)
(
lib.concatMapAttrs (
path: kind:
lib.optionalAttrs (kind == "directory") {
${path} = import "${inputs.self}/modules/${path}/meta.nix";
}
) (builtins.readDir "${inputs.self}/modules")
)