mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-16 01:45:11 +00:00
lib/types: make pattern of strMatching accessible
This commit is contained in:
parent
d2dfc1ac21
commit
ad7b2f3438
@ -443,6 +443,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…
Reference in New Issue
Block a user