mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-25 07:25:33 +03:00
e654ffaa10
- 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
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{
|
|
inputs = {
|
|
dream2nix.url = "path:../..";
|
|
src.url = "github:BurntSushi/ripgrep/13.0.0";
|
|
src.flake = false;
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
dream2nix,
|
|
src,
|
|
} @ inp:
|
|
(dream2nix.lib.makeFlakeOutputs {
|
|
systems = ["x86_64-linux"];
|
|
config.projectRoot = ./.;
|
|
config.modules = [
|
|
(builtins.toFile "cargo-toml-new.nix" ''
|
|
{
|
|
translators.cargo-toml-new = {
|
|
imports = ["${inp.dream2nix}/src/subsystems/rust/translators/cargo-toml"];
|
|
name = "cargo-toml-new";
|
|
subsystem = "rust";
|
|
};
|
|
}
|
|
'')
|
|
];
|
|
config.extra = {
|
|
subsystems.rust = {
|
|
builders.brp-new = "${inp.dream2nix}/src/subsystems/rust/builders/build-rust-package";
|
|
discoverers.default = "${inp.dream2nix}/src/subsystems/rust/discoverers/default";
|
|
};
|
|
fetchers.crates-io = "${inp.dream2nix}/src/fetchers/crates-io";
|
|
};
|
|
source = src;
|
|
settings = [
|
|
{
|
|
builder = "brp-new";
|
|
translator = "cargo-toml-new";
|
|
}
|
|
];
|
|
})
|
|
// {
|
|
checks.x86_64-linux.ripgrep = self.packages.x86_64-linux.ripgrep;
|
|
};
|
|
}
|