Skip to content

Commit de6a254

Browse files
ElvishJerriccoangerman
authored andcommitted
Remove self from depends of "all" component in the module system
Much cleaner to do this in the definition of `all`, rather than adding special logic elsewhere.
1 parent bda8ae7 commit de6a254

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/package.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ in {
184184
};
185185
all = mkOption {
186186
type = componentType;
187+
apply = all: all // {
188+
# TODO: Should this check for the entire component
189+
# definition to match, rather than just the identifier?
190+
depends = builtins.filter (p: p.identifier != config.package.identifier) all.depends;
191+
};
187192
description = "The merged dependencies of all other components";
188193
};
189194
};

0 commit comments

Comments
 (0)