2023-10-10 21:43:36 +03:00
|
|
|
{
|
|
|
|
self,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
perSystem = {
|
|
|
|
config,
|
|
|
|
self',
|
|
|
|
inputs',
|
|
|
|
pkgs,
|
|
|
|
...
|
2023-10-12 01:03:15 +03:00
|
|
|
}: let
|
|
|
|
excludes = [
|
|
|
|
# NOT WORKING
|
|
|
|
# TODO: fix those
|
|
|
|
"core"
|
|
|
|
"ui"
|
|
|
|
"docs"
|
|
|
|
"assertions"
|
|
|
|
|
|
|
|
# doesn't need to be rendered
|
|
|
|
"_template"
|
|
|
|
];
|
2024-03-07 11:35:30 +03:00
|
|
|
public = lib.genAttrs [
|
|
|
|
"nodejs-devshell-v3"
|
|
|
|
"nodejs-node-modules-v3"
|
|
|
|
"nodejs-package-json-v3"
|
|
|
|
"nodejs-package-lock-v3"
|
|
|
|
"php-composer-lock"
|
|
|
|
"pip"
|
|
|
|
"rust-cargo-lock"
|
|
|
|
"rust-crane"
|
|
|
|
] (name: null);
|
2023-10-12 01:03:15 +03:00
|
|
|
in {
|
2023-10-11 02:39:06 +03:00
|
|
|
render.inputs =
|
|
|
|
lib.flip lib.mapAttrs
|
2023-10-12 01:03:15 +03:00
|
|
|
(lib.filterAttrs
|
|
|
|
(name: module:
|
|
|
|
! (lib.elem name excludes))
|
|
|
|
(self.modules.dream2nix))
|
2023-10-11 02:39:06 +03:00
|
|
|
(name: module: {
|
|
|
|
title = name;
|
2023-12-03 11:46:10 +03:00
|
|
|
# module = self.modules.dream2nix.${name};
|
|
|
|
module =
|
|
|
|
if lib.pathExists (self.modules.dream2nix.${name} + /interface.nix)
|
|
|
|
then (self.modules.dream2nix.${name} + /interface.nix)
|
|
|
|
else module;
|
2023-10-11 02:39:06 +03:00
|
|
|
sourcePath = self;
|
|
|
|
attributePath = [
|
|
|
|
"dream2nix"
|
|
|
|
"modules"
|
|
|
|
"dream2nix"
|
|
|
|
(lib.strings.escapeNixIdentifier name)
|
|
|
|
];
|
2023-10-23 01:00:24 +03:00
|
|
|
intro =
|
2023-11-05 06:22:03 +03:00
|
|
|
if lib.pathExists ../dream2nix/${name}/README.md
|
|
|
|
then lib.readFile ../dream2nix/${name}/README.md
|
2023-10-23 01:00:24 +03:00
|
|
|
else "";
|
2023-10-10 21:43:36 +03:00
|
|
|
baseUrl = "https://github.com/nix-community/dream2nix/blob/master";
|
2023-10-11 02:39:06 +03:00
|
|
|
separateEval = true;
|
2024-03-07 11:35:30 +03:00
|
|
|
chapter =
|
|
|
|
if public ? ${name}
|
|
|
|
then "Modules"
|
|
|
|
else "Modules (Internal + Experimental)";
|
2023-10-11 02:39:06 +03:00
|
|
|
});
|
2023-10-10 21:43:36 +03:00
|
|
|
};
|
|
|
|
}
|