mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
lib/types: Show sub options of freeform types
Previously if you set the freeform type to e.g. attrsOf (submodule ..), those submodule options wouldn't be shown in the manual.
This commit is contained in:
parent
c54a127b62
commit
ea5ba6e13d
1 changed files with 6 additions and 1 deletions
|
@ -522,7 +522,12 @@ rec {
|
|||
# would be used, and use of `<` and `>` would break the XML document.
|
||||
# It shouldn't cause an issue since this is cosmetic for the manual.
|
||||
args.name = "‹name›";
|
||||
}).options;
|
||||
}).options // optionalAttrs (freeformType != null) {
|
||||
# Expose the sub options of the freeform type. Note that the option
|
||||
# discovery doesn't care about the attribute name used here, so this
|
||||
# is just to avoid conflicts with potential options from the submodule
|
||||
_freeformOptions = freeformType.getSubOptions prefix;
|
||||
};
|
||||
getSubModules = modules;
|
||||
substSubModules = m: submoduleWith (attrs // {
|
||||
modules = m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue