dream2nix/examples/d2n-extended/flake.nix
Yusuf Bera Ertan 9b6638a1a7
feat: implement makeOutputs that outputs systemless structure (#161)
* feat: return underlying d2n instance if pkgs was passed to init, document init pkgs

* feat: implement makeOutputs

* tests: dont fail if resolveImpure fails

* feat: make init return a dream2nix instance, rework makeFlakeOutputs code

* feat: default to source if config.projectRoot is not specified, update examples and readme

* fix: update the simple template

* docs: clarify init in readme

* docs: change readme numbering to back to 1

* refactor: dont default projectRoot to source

* docs: make extensive example use makeFlakeOutputs, link per-pkgs d2n example in readme

* fix: call loadConfig correctly
2022-06-01 22:53:46 +02:00

36 lines
962 B
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.extra = {
subsystems.rust = {
builders.brp-new = "${inp.dream2nix}/src/subsystems/rust/builders/build-rust-package";
translators.cargo-toml-new = "${inp.dream2nix}/src/subsystems/rust/translators/cargo-toml";
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;
};
}