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.
commitde6a254d0f4a1dd30cb169e77940d62585a6d89f
authorWill Fancher <elvishjerricco@gmail.com>
dateThu 7 Feb 2019, 04:29 (8 years ago)
parentbda8ae7
modules/package.nix+5
@@ -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 };