mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
lib.modules: compute disabled module list early
isDisabled gets the list of disabledModules ready when it's only given two attributes, so when it's passed the third argument, it just has to call `elem` on its precomputed list. This was being used in the graph right below, but now in module filtering.
This commit is contained in:
@@ -564,7 +564,8 @@ let
|
||||
modulesPath:
|
||||
{ disabled, modules }:
|
||||
let
|
||||
keyFilter = filter (attrs: !isDisabled modulesPath disabled attrs);
|
||||
isDisabledModule = isDisabled modulesPath disabled;
|
||||
keyFilter = filter (attrs: !isDisabledModule attrs);
|
||||
in
|
||||
catAttrs "module" (genericClosure {
|
||||
startSet = keyFilter modules;
|
||||
|
||||
Reference in New Issue
Block a user