mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-29 17:33:46 +03:00
feat: define projects via attrset, rename flakePartsModule to flakeModule
This commit is contained in:
parent
f15d2efa0b
commit
5fd403b090
@ -16,15 +16,13 @@
|
||||
}:
|
||||
flake-parts.lib.mkFlake {inherit self;} {
|
||||
systems = ["x86_64-linux"];
|
||||
imports = [dream2nix.flakePartsModule];
|
||||
imports = [dream2nix.flakeModule];
|
||||
dream2nix = {
|
||||
config.projectRoot = ./.;
|
||||
projects = [
|
||||
{
|
||||
source = src;
|
||||
settings = [{builder = "crane";}];
|
||||
}
|
||||
];
|
||||
projects."ripgrep" = {
|
||||
source = src;
|
||||
settings = [{builder = "crane";}];
|
||||
};
|
||||
};
|
||||
perSystem = {
|
||||
config,
|
||||
|
@ -194,7 +194,7 @@
|
||||
# kept for compat
|
||||
lib2 = d2n-lib;
|
||||
|
||||
flakePartsModule = {
|
||||
flakeModule = {
|
||||
imports = [./src/modules/flake-parts];
|
||||
dream2nix.lib = d2n-lib;
|
||||
};
|
||||
|
@ -12,7 +12,9 @@
|
||||
}
|
||||
// p;
|
||||
outputs = d2n.lib.dlib.mergeFlakes (
|
||||
l.map (p: d2n.lib.makeFlakeOutputs (makeArgs p)) d2n.projects
|
||||
l.map
|
||||
(p: d2n.lib.makeFlakeOutputs (makeArgs p))
|
||||
(l.attrValues d2n.projects)
|
||||
);
|
||||
in {
|
||||
config = {
|
||||
|
@ -26,8 +26,8 @@ in {
|
||||
'';
|
||||
};
|
||||
projects = l.mkOption {
|
||||
type = t.listOf t.raw;
|
||||
default = [];
|
||||
type = t.attrsOf t.raw;
|
||||
default = {};
|
||||
description = ''
|
||||
The projects that outputs will be generated for.
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user