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>


== Dynamic key names can conditionally assign attribute set entries ==
This can be (ab)used to conditionally include or exclude attribute set entries, for example:
 
Dynamic key names with conditional expressions can be used to conditionally include or exclude attribute set entries


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 211: Line 209:
{ }
{ }
</syntaxHighlight>
</syntaxHighlight>


== Nix Language FAQ ==
== Nix Language FAQ ==