query
On this page

checkFlag

lib.misc.checkFlag

Docs pulled from | This Revision | 29 minutes ago
Deprecated


Nixpkgs manual

Returns true only if there is an attribute and it is true.

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

checkFlag =
    attrSet: name:
    if name == "true" then
      true
    else if name == "false" then
      false
    else if (elem name (attrByPath [ "flags" ] [ ] attrSet)) then
      true
    else
      attrByPath [ name ] false attrSet;