about summary refs log tree commit diff
path: root/lib/strings.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strings.nix')
-rw-r--r--lib/strings.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/strings.nix b/lib/strings.nix
index 89574bc8367c2..db89f60c480ce 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -810,10 +810,9 @@ rec {
      null, bool, list of similarly coercible values.
   */
   isConvertibleWithToString = x:
-    elem (typeOf x) [ "path" "string" "null" "int" "float" "bool" ] ||
-    (isList x && lib.all isConvertibleWithToString x) ||
-    x ? outPath ||
-    x ? __toString;
+    isStringLike x ||
+    elem (typeOf x) [ "null" "int" "float" "bool" ] ||
+    (isList x && lib.all isConvertibleWithToString x);
 
   /* Check whether a value can be coerced to a string.
      The value must be a string, path, or attribute set.