lib.strings: isSimpleCoercibleString -> isStringLike

This commit is contained in:
Robert Hensing 2022-12-31 00:38:16 +01:00
parent 5b8de3d9d8
commit 872a24ebbc
2 changed files with 10 additions and 10 deletions

View file

@ -54,7 +54,7 @@ let
concatStringsSep
escapeNixString
hasInfix
isSimpleCoercibleToString
isStringLike
;
inherit (lib.trivial)
boolToString
@ -227,7 +227,7 @@ rec {
merge = loc: defs:
let
getType = value:
if isAttrs value && isSimpleCoercibleToString value
if isAttrs value && isStringLike value
then "stringCoercibleSet"
else builtins.typeOf value;
@ -479,7 +479,7 @@ rec {
path = mkOptionType {
name = "path";
descriptionClass = "noun";
check = x: isSimpleCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
merge = mergeEqualOption;
};