dream2nix/examples/_d2n-extended-new-subsystem/translators.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

27 lines
671 B
Nix

{
translators.dummy = {...}: {
type = "pure";
name = "dummy";
subsystem = "hello";
translate = {hello, ...}: {...}: {
result = {
_generic = {
subsystem = "hello";
defaultPackage = "hello";
location = "";
sourcesAggregatedHash = null;
packages = {${hello.pname} = hello.version;};
};
_subsystem = {};
cyclicDependencies = {};
dependencies.${hello.pname}.${hello.version} = [];
sources.${hello.pname}.${hello.version} = {
type = "http";
url = hello.src.url;
hash = hello.src.outputHash;
};
};
};
};
}