Nix operators
name | syntax | description |
---|---|---|
Select | e.attr [or def] | Evaluates to the value of attr in set e , or to def if the or keywordᛦ is used |
Application | e1 e2 | Call function e1 with argument e2 |
Arithmetic negation | - e | Self-explanatory |
Has attribute | e ? attr | Tests whether a set contains an attribute, returning a boolean |
List concatenation | e1 ++ e2 | Self-explanatory |
Multiplication | e1 * e2 | Self-explanatory |
Division | e1 / e2 | Self-explanatory |
Addition | e1 + e2 | Self-explanatory |
Subtraction | e1 - e2 | Self-explanatory |
String concatenation | e1 + e2 | Self-explanatory |
Not | ! e | Self-explanatory |
Update | e1 // e2 | Merge sets e1 and e2 , with attributes in e2 overwriting matching attributes in e1 |
Comparison | < , > , <= , >= | Self-explanatory |
Equality | == , != | Self-explanatory |
Logic | && , || | Self-explanatory |
Logical implication | e1 -> e2 | Self-explanatory |