dream2nix/examples/_d2n-extended-new-subsystem/extra.nix
DavHau e654ffaa10 feat: module system improvements
- add documentation to the subsystem-loading interface
- expose evaled modules publicly via `framework`
- add option config.modules to allow users to include their own modules
- update examples for extending dream2nix
2022-08-15 15:34:24 +02:00

23 lines
515 B
Nix

{dlib, ...}: {
subsystems.hello = {
discoverers.default = {subsystem, ...}: {
discover = {tree}: [
(dlib.construct.discoveredProject {
inherit subsystem;
inherit (tree) relPath;
name = "hello";
translators = ["dummy"];
subsystemInfo = {};
})
];
};
builders.dummy = {...}: {
type = "pure";
build = {hello, ...}: {...}: {
packages.${hello.pname}.${hello.version} =
hello;
};
};
};
}