This website requires JavaScript.
Explore
Help
Sign In
cafkafk
/
lix
Watch
1
Star
0
Fork
You've already forked lix
0
Code
Issues
Pull requests
1
Projects
Releases
Packages
Wiki
Activity
Actions
0a470fc345
lix
/
tests
/
lang
/
eval-okay-delayed-with.exp
2 lines
15 B
Text
Raw
Normal View
History
Unescape
Escape
Delay evaulation of `with` attrs until a variable lookup needs them Evaluation of attribute sets is strict in the attribute names, which means immediate evaluation of `with` attribute sets rules out some potentially interesting use cases (e.g. where the attribute names of one set depend in some way on another but we want to bring those names into scope for some values in the second set). The major example of this is overridable self-referential package sets (e.g. all-packages.nix). With immediate `with` evaluation, the only options for such sets are to either make them non-recursive and explicitly use the name of the overridden set in non-overridden one every time you want to reference another package, or make the set recursive and use the `__overrides` hack. As shown in the test case that comes with this commit, though, delayed `with` evaluation allows a nicer third alternative. Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-15 21:53:14 +02:00
"b-overridden"
Reference in a new issue
Copy permalink