Nix Language Quirks: Difference between revisions
Add quirk regarding conditional key names defining attribute set entries |
Merge the conditional key names entry just I added with the existing using null as a key name, and just add the more clear example of using conditionals |
||
| Line 200: | Line 200: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
This can be (ab)used to conditionally include or exclude attribute set entries, for example: | |||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
| Line 211: | Line 209: | ||
{ } | { } | ||
</syntaxHighlight> | </syntaxHighlight> | ||
== Nix Language FAQ == | == Nix Language FAQ == | ||