diff options
author | Nicolas B. Pierron <nicolas.b.pierron@gmail.com> | 2017-10-30 11:17:06 +0000 |
---|---|---|
committer | Nicolas B. Pierron <nicolas.b.pierron@gmail.com> | 2017-10-30 13:06:18 +0100 |
commit | d8987135c264cec552ebca51348a16c63a833fbb (patch) | |
tree | 294a82b33622a44b7ee6a0147ba0a2ae2eb145cf /lib/types.nix | |
parent | dd0cdc2fb4dcc195bb00c5602f0c1da28dbd5282 (diff) | |
download | nixpkgs-d8987135c264cec552ebca51348a16c63a833fbb.tar nixpkgs-d8987135c264cec552ebca51348a16c63a833fbb.tar.gz nixpkgs-d8987135c264cec552ebca51348a16c63a833fbb.tar.bz2 nixpkgs-d8987135c264cec552ebca51348a16c63a833fbb.tar.lz nixpkgs-d8987135c264cec552ebca51348a16c63a833fbb.tar.xz nixpkgs-d8987135c264cec552ebca51348a16c63a833fbb.tar.zst nixpkgs-d8987135c264cec552ebca51348a16c63a833fbb.zip |
types.submodule: Replace a friendly comment by a more gentle one.
Diffstat (limited to 'lib/types.nix')
-rw-r--r-- | lib/types.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/types.nix b/lib/types.nix index c48e3b3000c..dd0f31e9d14 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -288,8 +288,17 @@ rec { }).config; getSubOptions = prefix: (evalModules { modules = opts'; inherit prefix; - # FIXME: hack to get shit to evaluate. - args = { name = ""; }; }).options; + # This is a work-around due to the fact that some sub-modules, + # such as the one included in an attribute set, expects a "args" + # attribute to be given to the sub-module. As the option + # evaluation does not have any specific attribute name, we + # provide a default one for the documentation. + # + # This is mandatory as some option declaration might use the + # "name" attribute given as argument of the submodule and use it + # as the default of option declarations. + args.name = "<name>"; + }).options; getSubModules = opts'; substSubModules = m: submodule m; functor = (defaultFunctor name) // { |