mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
lib.strings: isSimpleCoercibleString -> isStringLike
This commit is contained in:
parent
5b8de3d9d8
commit
872a24ebbc
2 changed files with 10 additions and 10 deletions
|
@ -54,7 +54,7 @@ let
|
|||
concatStringsSep
|
||||
escapeNixString
|
||||
hasInfix
|
||||
isSimpleCoercibleToString
|
||||
isStringLike
|
||||
;
|
||||
inherit (lib.trivial)
|
||||
boolToString
|
||||
|
@ -227,7 +227,7 @@ rec {
|
|||
merge = loc: defs:
|
||||
let
|
||||
getType = value:
|
||||
if isAttrs value && isSimpleCoercibleToString value
|
||||
if isAttrs value && isStringLike value
|
||||
then "stringCoercibleSet"
|
||||
else builtins.typeOf value;
|
||||
|
||||
|
@ -479,7 +479,7 @@ rec {
|
|||
path = mkOptionType {
|
||||
name = "path";
|
||||
descriptionClass = "noun";
|
||||
check = x: isSimpleCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
|
||||
check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
|
||||
merge = mergeEqualOption;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue