mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 06:01:19 +00:00
treewide: isCoercibleToString -> isMoreCoercibleToString
No change in behavior.
This commit is contained in:
parent
68b6443ed6
commit
fed5dc66f8
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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}";
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user