query
On this page

getAttr

lib.attrsets.getAttr

Primop
Docs pulled from | This Revision | 8 minutes ago

Takes 2 arguments

s, set


getAttr returns the attribute named s from set. Evaluation aborts if the attribute doesn’t exist. This is a dynamic version of the . operator, since s is an expression rather than an identifier.


Noogle detected

Aliases

Detected Type
getAttr :: String -> AttrSet -> a

Implementation

This function is implemented in c++ and is part of the native nix runtime.