@@ -288,8 +288,17 @@ rec {
288288 }).config;
289289 getSubOptions = prefix: (evalModules
290290 { modules = opts'; inherit prefix;
291− # FIXME: hack to get shit to evaluate.
292− args = { name = ""; }; }).options;
291+ # This is a work-around due to the fact that some sub-modules,
292+ # such as the one included in an attribute set, expects a "args"
293+ # attribute to be given to the sub-module. As the option
294+ # evaluation does not have any specific attribute name, we
295+ # provide a default one for the documentation.
296+ #
297+ # This is mandatory as some option declaration might use the
298+ # "name" attribute given as argument of the submodule and use it
299+ # as the default of option declarations.
300+ args.name = "<name>";
301+ }).options;
293302 getSubModules = opts';
294303 substSubModules = m: submodule m;
295304 functor = (defaultFunctor name) // {