2022-05-29 22:42:47 +03:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
dream2nix.url = "path:../..";
|
2022-11-13 14:11:56 +03:00
|
|
|
src.url = "github:yusdacra/linemd/v0.4.0";
|
2022-05-29 22:42:47 +03:00
|
|
|
src.flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
dream2nix,
|
|
|
|
src,
|
2022-06-01 23:53:46 +03:00
|
|
|
} @ inp:
|
|
|
|
(dream2nix.lib.makeFlakeOutputs {
|
2022-05-29 22:42:47 +03:00
|
|
|
systems = ["x86_64-linux"];
|
|
|
|
config.projectRoot = ./.;
|
2022-08-15 16:34:24 +03:00
|
|
|
config.modules = [
|
|
|
|
(builtins.toFile "cargo-toml-new.nix" ''
|
|
|
|
{
|
|
|
|
translators.cargo-toml-new = {
|
2022-10-06 22:48:12 +03:00
|
|
|
imports = [(attrs: import "${inp.dream2nix}/src/subsystems/rust/translators/cargo-toml" attrs.framework)];
|
2022-08-15 16:34:24 +03:00
|
|
|
name = "cargo-toml-new";
|
|
|
|
subsystem = "rust";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
'')
|
2022-09-25 22:54:05 +03:00
|
|
|
(builtins.toFile "brp-new.nix" ''
|
|
|
|
{
|
|
|
|
builders.brp-new = {
|
2022-10-06 22:48:12 +03:00
|
|
|
imports = [(attrs: import "${inp.dream2nix}/src/subsystems/rust/builders/build-rust-package" attrs.framework)];
|
2022-09-25 22:54:05 +03:00
|
|
|
name = "brp-new";
|
|
|
|
subsystem = "rust";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
'')
|
2022-09-27 21:51:00 +03:00
|
|
|
(builtins.toFile "cargo-new.nix" ''
|
|
|
|
{
|
|
|
|
discoverers.cargo-new = {
|
2022-10-06 22:48:12 +03:00
|
|
|
imports = [(attrs: import "${inp.dream2nix}/src/subsystems/rust/discoverers/cargo" attrs.framework)];
|
2022-09-27 21:51:00 +03:00
|
|
|
name = "cargo-new";
|
|
|
|
subsystem = "rust";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
'')
|
2022-10-04 15:29:26 +03:00
|
|
|
(builtins.toFile "crates-io-new.nix" ''
|
2022-10-06 20:53:59 +03:00
|
|
|
{config, ...}: {
|
|
|
|
fetchers.crates-io = config.lib.mkForce {
|
2022-10-06 22:48:12 +03:00
|
|
|
imports = [(attrs: import "${inp.dream2nix}/src/fetchers/crates-io" attrs.framework)];
|
2022-10-04 15:29:26 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
'')
|
2022-08-15 16:34:24 +03:00
|
|
|
];
|
2022-05-29 22:42:47 +03:00
|
|
|
source = src;
|
|
|
|
settings = [
|
|
|
|
{
|
|
|
|
builder = "brp-new";
|
|
|
|
translator = "cargo-toml-new";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
})
|
|
|
|
// {
|
2022-11-15 02:13:25 +03:00
|
|
|
# checks.x86_64-linux.linemd = self.packages.x86_64-linux.linemd;
|
2022-05-29 22:42:47 +03:00
|
|
|
};
|
|
|
|
}
|