Loading lib/modules.nix +5 −5 Original line number Diff line number Diff line Loading @@ -761,13 +761,13 @@ rec { options = opt.options or (throw "Option `${showOption loc}' has type optionSet but has no option attribute, in ${showFiles opt.declarations}."); f = tp: let optionSetIn = type: (tp.name == type) && (tp.functor.wrapped.name == "optionSet"); in if tp.name == "option set" || tp.name == "submodule" then throw "The option ${showOption loc} uses submodules without a wrapping type, in ${showFiles opt.declarations}." else if optionSetIn "attrsOf" then types.attrsOf (types.submodule options) else if optionSetIn "listOf" then types.listOf (types.submodule options) else if optionSetIn "nullOr" then types.nullOr (types.submodule options) else if (tp.functor.wrapped.name or null) == "optionSet" then if tp.name == "attrsOf" then types.attrsOf (types.submodule options) else if tp.name == "listOf" then types.listOf (types.submodule options) else if tp.name == "nullOr" then types.nullOr (types.submodule options) else tp else tp; in if opt.type.getSubModules or null == null Loading Loading
lib/modules.nix +5 −5 Original line number Diff line number Diff line Loading @@ -761,13 +761,13 @@ rec { options = opt.options or (throw "Option `${showOption loc}' has type optionSet but has no option attribute, in ${showFiles opt.declarations}."); f = tp: let optionSetIn = type: (tp.name == type) && (tp.functor.wrapped.name == "optionSet"); in if tp.name == "option set" || tp.name == "submodule" then throw "The option ${showOption loc} uses submodules without a wrapping type, in ${showFiles opt.declarations}." else if optionSetIn "attrsOf" then types.attrsOf (types.submodule options) else if optionSetIn "listOf" then types.listOf (types.submodule options) else if optionSetIn "nullOr" then types.nullOr (types.submodule options) else if (tp.functor.wrapped.name or null) == "optionSet" then if tp.name == "attrsOf" then types.attrsOf (types.submodule options) else if tp.name == "listOf" then types.listOf (types.submodule options) else if tp.name == "nullOr" then types.nullOr (types.submodule options) else tp else tp; in if opt.type.getSubModules or null == null Loading