git.iko.soy/typeable/nixpkgs
on master help sign in
types.submodule: Replace a friendly comment by a more gentle one.
commitd8987135c264cec552ebca51348a16c63a833fbb authorNicolas B. Pierron <nicolas.b.pierron@gmail.com> dateMon 30 Oct 2017, 11:17 (9 years ago) parentdd0cdc2
1 file changed+11−2
lib/types.nix+11−2
lib/types.nix+11−2
@@ -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) // {