isDarwin
lib.systems.inspect.predicates.isDarwin
Docs pulled from | This Revision | about 1 hour ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
- Write API documentation for this function
Learn how to write documentation
- Improve position tracking
Contribute to Noogle
Noogle detected
Implementation
The following is the current implementation of this function.
attrs:
assert isAttrs pattern;
all (
# Compare equality between `pattern` & `attrs`.
attr:
# Missing attr, not equal.
attrs ? ${attr}
&& (
let
lhs = pattern.${attr};
rhs = attrs.${attr};
in
# If attrset check recursively
if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs
)
) (attrNames pattern)