// When not recursive, we need to ensure that the temporary variables are defined a scope *higher* than the attribute set that actually makes use of their properties, because we cannot access those variables from the attribute bindings otherwise.
returnnixTypes.NixLetIn(
letBindings,
{
...node,
bind:[
...regularBindings,
...inheritedAttributeBindings
]
}
);
}else{
// ... but when recursive, we *must* specify the temporary variables as part of the recursive attribute set itself, because otherwise we don't have the ability to bidirectionally reference between fixed attributes and inherited ones; see, for example, eval-okay-scope-7.nix.
// FIXME: Mark the temporary variables as 'internal' so that they don't get returned in the final object; this would make the generated code more readable.