fix: fix extended examples

This commit is contained in:
Yusuf Bera Ertan 2022-09-27 21:51:00 +03:00
parent f1c89df1d9
commit 6871e9e560
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA
4 changed files with 23 additions and 18 deletions

View File

@ -0,0 +1,13 @@
{dlib, ...}: {
discoverers.default = {subsystem, ...}: {
discover = {tree}: [
(dlib.construct.discoveredProject {
inherit subsystem;
inherit (tree) relPath;
name = "hello";
translators = ["dummy"];
subsystemInfo = {};
})
];
};
}

View File

@ -1,15 +0,0 @@
{dlib, ...}: {
subsystems.hello = {
discoverers.default = {subsystem, ...}: {
discover = {tree}: [
(dlib.construct.discoveredProject {
inherit subsystem;
inherit (tree) relPath;
name = "hello";
translators = ["dummy"];
subsystemInfo = {};
})
];
};
};
}

View File

@ -12,6 +12,7 @@
config.projectRoot = ./.;
config.extra = ./extra.nix;
config.modules = [
./discoverers.nix
./translators.nix
./builders.nix
];

View File

@ -32,11 +32,17 @@
};
}
'')
(builtins.toFile "cargo-new.nix" ''
{
discoverers.cargo-new = {
imports = ["${inp.dream2nix}/src/subsystems/rust/discoverers/cargo"];
name = "cargo-new";
subsystem = "rust";
};
}
'')
];
config.extra = {
subsystems.rust = {
discoverers.default = "${inp.dream2nix}/src/subsystems/rust/discoverers/default";
};
fetchers.crates-io = "${inp.dream2nix}/src/fetchers/crates-io";
};
source = src;