diff options
| author | Robert Hensing <robert@roberthensing.nl> | 2022-12-28 23:38:06 +0100 |
|---|---|---|
| committer | Robert Hensing <robert@roberthensing.nl> | 2022-12-31 01:03:24 +0100 |
| commit | fed5dc66f80ae3a159a2449904ae067f60a04a67 (patch) | |
| tree | 29abdf5af503b692fdd96d90f452ef4c241a40ed /lib | |
| parent | lib.strings: Rename isCoercibleToString -> isMoreCoercibleToString (diff) | |
| download | nixpkgs-fed5dc66f80ae3a159a2449904ae067f60a04a67.tar.gz | |
treewide: isCoercibleToString -> isMoreCoercibleToString
No change in behavior.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/strings.nix | 2 | ||||
| -rw-r--r-- | lib/types.nix | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/strings.nix b/lib/strings.nix index 897fa3e3a204..6d2462d03b2a 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 a99872d2f96b..b5ac0369c539 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; }; |
