feat(tvix/eval): implement dynamic keys in recursive attrs
This wires up the new bindings setup logic to be able to thread through & compile dynamic attributes in recursive attrs. It seems like we don't actually need to retain the phasing of Nix exactly, as we can use the phantom mechanism to declare all locals without making the dynamic ones accessible. Change-Id: Ic2d43dd8fd97d7ccd56d8c6adf2ff97274cd837a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6781 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
b593f6922c
commit
949897651e
3 changed files with 39 additions and 29 deletions
|
|
@ -0,0 +1 @@
|
|||
{ barbaz = 42; foobar = 42; val = 21; }
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
rec {
|
||||
val = 21;
|
||||
${"foo" + "bar"} = 42;
|
||||
${"bar" + "baz"} = val * 2;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue