lib/options: mkAttrsOf, mkListOf, mkAttributeSet should accept raw values

This commit is contained in:
Gaetan Lepage 2024-12-31 11:00:20 +01:00
parent c04dda021b
commit caef39133f

View file

@ -182,17 +182,17 @@ rec {
mkStr' = args: mkNullableWithRaw' (args // { type = types.str; }); mkStr' = args: mkNullableWithRaw' (args // { type = types.str; });
mkStr = pluginDefault: description: mkStr' { inherit pluginDefault description; }; mkStr = pluginDefault: description: mkStr' { inherit pluginDefault description; };
mkAttributeSet' = args: mkNullable' (args // { type = types.attrs; }); mkAttributeSet' = args: mkNullableWithRaw' (args // { type = types.attrs; });
mkAttributeSet = pluginDefault: description: mkAttributeSet' { inherit pluginDefault description; }; mkAttributeSet = pluginDefault: description: mkAttributeSet' { inherit pluginDefault description; };
mkListOf' = mkListOf' =
{ type, ... }@args: mkNullable' (args // { type = with types; listOf (maybeRaw type); }); { type, ... }@args: mkNullableWithRaw' (args // { type = with types; listOf (maybeRaw type); });
mkListOf = mkListOf =
type: pluginDefault: description: type: pluginDefault: description:
mkListOf' { inherit type pluginDefault description; }; mkListOf' { inherit type pluginDefault description; };
mkAttrsOf' = mkAttrsOf' =
{ type, ... }@args: mkNullable' (args // { type = with types; attrsOf (maybeRaw type); }); { type, ... }@args: mkNullableWithRaw' (args // { type = with types; attrsOf (maybeRaw type); });
mkAttrsOf = mkAttrsOf =
type: pluginDefault: description: type: pluginDefault: description:
mkAttrsOf' { inherit type pluginDefault description; }; mkAttrsOf' { inherit type pluginDefault description; };