treewide: isCoercibleToString -> isMoreCoercibleToString

No change in behavior.
This commit is contained in:
Robert Hensing 2022-12-28 23:38:06 +01:00
parent 68b6443ed6
commit fed5dc66f8
4 changed files with 5 additions and 5 deletions

View file

@ -810,7 +810,7 @@ rec {
*/
isMoreCoercibleToString = x:
elem (typeOf x) [ "path" "string" "null" "int" "float" "bool" ] ||
(isList x && lib.all isCoercibleToString x) ||
(isList x && lib.all isMoreCoercibleToString x) ||
x ? outPath ||
x ? __toString;

View file

@ -54,7 +54,7 @@ let
concatStringsSep
escapeNixString
hasInfix
isCoercibleToString
isMoreCoercibleToString
isSimpleCoercibleToString
;
inherit (lib.trivial)
@ -480,7 +480,7 @@ rec {
path = mkOptionType {
name = "path";
descriptionClass = "noun";
check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
check = x: isMoreCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
merge = mergeEqualOption;
};

View file

@ -42,7 +42,7 @@ let
else if isDerivation v then toString v
else if builtins.isPath v then toString v
else if isString v then v
else if strings.isCoercibleToString v then toString v
else if strings.isMoreCoercibleToString v then toString v
else abort "The nix conf value: ${toPretty {} v} can not be encoded";
mkKeyValue = k: v: "${escape [ "=" ] k} = ${mkValueString v}";

View file

@ -18,7 +18,7 @@ let
in
lib.concatStrings (lib.mapAttrsToList toArg args);
isPathType = x: lib.strings.isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
isPathType = x: lib.strings.isMoreCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
in
{