query
On this page

matchAttrs

lib.matchAttrs

Docs pulled from | This Revision | 39 minutes ago


Recurse into every attribute set of the first argument and check that:

  • Each attribute path also exists in the second argument.
  • If the attribute's value is not a nested attribute set, it must have the same value in the right argument.

Inputs

pattern

Attribute set structure to match

attrs

Attribute set to check

Type

matchAttrs :: AttrSet -> AttrSet -> Bool

Examples

lib.attrsets.matchAttrs usage example

matchAttrs { cpu = {}; } { cpu = { bits = 64; }; }
=> true
(lib.attrsets.matchAttrs)

Noogle also knows

Aliases