listToAttrs
builtins.listToAttrs
Primop
Docs pulled from | This Revision | about 9 hours ago
Takes 1 arguments
e
Construct a set from a list specifying the names and values of each
attribute. Each element of the list should be a set consisting of a
string-valued attribute name
specifying the name of the attribute,
and an attribute value
specifying its value.
In case of duplicate occurrences of the same name, the first takes precedence.
Example:
builtins.listToAttrs
[ { name = "foo"; value = 123; }
{ name = "bar"; value = 456; }
{ name = "bar"; value = 420; }
]
evaluates to
{ foo = 123; bar = 456; }
This function is not defined in a .nix file. It is likely a builtins function or an alias of a builtins function. builtins functions are predefined functions provided by Nix.
Noogle also knows
Aliases
Detected Type
listToAttrs :: [{name :: String; value :: a}] -> AttrSet