Fix sub-module argument manipulation: Avoid using an empty set to check

the type of the module.

svn path=/nixpkgs/trunk/; revision=17666
This commit is contained in:
Nicolas Pierron 2009-10-06 09:21:17 +00:00
parent 1a093f3b73
commit c3d328ca48
1 changed files with 5 additions and 8 deletions

View File

@ -192,16 +192,13 @@ rec {
# locations to sub-options declarations # locations to sub-options declarations
decls = decls =
map (m: map (m:
mapSubOptions (subModule: mapSubOptions (subModule: (args:
let module = lib.applyIfFunction subModule {}; in let module = lib.applyIfFunction subModule args; in
if lib.isModule module then if lib.isModule module then
{ inherit (m) key; } // subModule { inherit (m) key; } // module
else else
args: { { inherit (m) key; options = module; }
inherit (m) key; )) m.options
options = lib.applyIfFunction subModule args;
}
) m.options
) (declarationsOf name); ) (declarationsOf name);
in in
addOptionMakeUp addOptionMakeUp