summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-12-28 23:38:06 +0100
committerRobert Hensing <robert@roberthensing.nl>2022-12-31 01:03:24 +0100
commitfed5dc66f80ae3a159a2449904ae067f60a04a67 (patch)
tree29abdf5af503b692fdd96d90f452ef4c241a40ed
parent68b6443ed635a3e87a62a5a8dcfd05e952c93192 (diff)
downloadnixpkgs-fed5dc66f80ae3a159a2449904ae067f60a04a67.tar
nixpkgs-fed5dc66f80ae3a159a2449904ae067f60a04a67.tar.gz
nixpkgs-fed5dc66f80ae3a159a2449904ae067f60a04a67.tar.bz2
nixpkgs-fed5dc66f80ae3a159a2449904ae067f60a04a67.tar.lz
nixpkgs-fed5dc66f80ae3a159a2449904ae067f60a04a67.tar.xz
nixpkgs-fed5dc66f80ae3a159a2449904ae067f60a04a67.tar.zst
nixpkgs-fed5dc66f80ae3a159a2449904ae067f60a04a67.zip
treewide: isCoercibleToString -> isMoreCoercibleToString
No change in behavior.
-rw-r--r--lib/strings.nix2
-rw-r--r--lib/types.nix4
-rw-r--r--nixos/modules/services/misc/nix-daemon.nix2
-rw-r--r--nixos/modules/services/system/self-deploy.nix2
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/strings.nix b/lib/strings.nix
index 897fa3e3a20..6d2462d03b2 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -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;
 
diff --git a/lib/types.nix b/lib/types.nix
index a99872d2f96..b5ac0369c53 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -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;
     };
 
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index 10db7cdfb33..98d5150f243 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -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}";
diff --git a/nixos/modules/services/system/self-deploy.nix b/nixos/modules/services/system/self-deploy.nix
index 9b1ebfd3752..9f5f39970f2 100644
--- a/nixos/modules/services/system/self-deploy.nix
+++ b/nixos/modules/services/system/self-deploy.nix
@@ -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
 {