mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 14:11:21 +00:00
lib/types: Make submodules use the freeform type description
Submodules that have a freeform type set behave as if that was the type of the option itself (for values that don't have an option). Since the submodules options are shown as separate entries in the manual, it makes sense to show the freeform type as the submodule type.
This commit is contained in:
parent
65e25deb06
commit
2d45a62899
@ -486,9 +486,15 @@ rec {
|
||||
else value
|
||||
) defs;
|
||||
|
||||
freeformType = (evalModules {
|
||||
inherit modules specialArgs;
|
||||
args.name = "‹name›";
|
||||
})._module.freeformType;
|
||||
|
||||
in
|
||||
mkOptionType rec {
|
||||
name = "submodule";
|
||||
description = freeformType.description or name;
|
||||
check = x: isAttrs x || isFunction x || path.check x;
|
||||
merge = loc: defs:
|
||||
(evalModules {
|
||||
|
Loading…
Reference in New Issue
Block a user