mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
lib/types: make pattern of strMatching accessible (#350467)
This commit is contained in:
commit
33fe023937
3 changed files with 23 additions and 0 deletions
|
@ -461,6 +461,11 @@ rec {
|
|||
descriptionClass = "noun";
|
||||
check = x: str.check x && builtins.match pattern x != null;
|
||||
inherit (str) merge;
|
||||
functor = defaultFunctor "strMatching" // {
|
||||
type = payload: strMatching payload.pattern;
|
||||
payload = { inherit pattern; };
|
||||
binOp = lhs: rhs: if lhs == rhs then lhs else null;
|
||||
};
|
||||
};
|
||||
|
||||
# Merge multiple definitions by concatenating them (with the given
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue