treewide: isCoercibleToString -> isMoreCoercibleToString
No change in behavior.
This commit is contained in:
@@ -810,7 +810,7 @@ rec {
|
|||||||
*/
|
*/
|
||||||
isMoreCoercibleToString = x:
|
isMoreCoercibleToString = x:
|
||||||
elem (typeOf x) [ "path" "string" "null" "int" "float" "bool" ] ||
|
elem (typeOf x) [ "path" "string" "null" "int" "float" "bool" ] ||
|
||||||
(isList x && lib.all isCoercibleToString x) ||
|
(isList x && lib.all isMoreCoercibleToString x) ||
|
||||||
x ? outPath ||
|
x ? outPath ||
|
||||||
x ? __toString;
|
x ? __toString;
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ let
|
|||||||
concatStringsSep
|
concatStringsSep
|
||||||
escapeNixString
|
escapeNixString
|
||||||
hasInfix
|
hasInfix
|
||||||
isCoercibleToString
|
isMoreCoercibleToString
|
||||||
isSimpleCoercibleToString
|
isSimpleCoercibleToString
|
||||||
;
|
;
|
||||||
inherit (lib.trivial)
|
inherit (lib.trivial)
|
||||||
@@ -480,7 +480,7 @@ rec {
|
|||||||
path = mkOptionType {
|
path = mkOptionType {
|
||||||
name = "path";
|
name = "path";
|
||||||
descriptionClass = "noun";
|
descriptionClass = "noun";
|
||||||
check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
|
check = x: isMoreCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
|
||||||
merge = mergeEqualOption;
|
merge = mergeEqualOption;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ let
|
|||||||
else if isDerivation v then toString v
|
else if isDerivation v then toString v
|
||||||
else if builtins.isPath v then toString v
|
else if builtins.isPath v then toString v
|
||||||
else if isString v then 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";
|
else abort "The nix conf value: ${toPretty {} v} can not be encoded";
|
||||||
|
|
||||||
mkKeyValue = k: v: "${escape [ "=" ] k} = ${mkValueString v}";
|
mkKeyValue = k: v: "${escape [ "=" ] k} = ${mkValueString v}";
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ let
|
|||||||
in
|
in
|
||||||
lib.concatStrings (lib.mapAttrsToList toArg args);
|
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
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user