mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 16:16:16 +02:00
adding all the value names from env.values[0]
This commit is contained in:
parent
bd3b5329f9
commit
d8a977a22e
2 changed files with 12 additions and 14 deletions
|
@ -698,21 +698,19 @@ void mapEnvBindings(const Env &env, valmap & vm)
|
||||||
}
|
}
|
||||||
|
|
||||||
// merge - and write over - higher level bindings.
|
// merge - and write over - higher level bindings.
|
||||||
if (env.valuemap)
|
if (env.values[0]->type() == nAttrs) {
|
||||||
vm.merge(*env.valuemap);
|
auto map = valmap();
|
||||||
|
|
||||||
|
Bindings::iterator j = env.values[0]->attrs->begin();
|
||||||
|
|
||||||
|
while (j != env.values[0]->attrs->end()) {
|
||||||
|
map[j->name] = j->value;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
vm.merge(map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// void mapEnvBindings(const Env &env, valmap & vm)
|
|
||||||
// {
|
|
||||||
// // add bindings for the next level up first.
|
|
||||||
// if (env.up) {
|
|
||||||
// mapEnvBindings(*env.up, vm);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // merge - and write over - higher level bindings.
|
|
||||||
// if (env.valuemap)
|
|
||||||
// vm.merge(*env.valuemap);
|
|
||||||
// }
|
|
||||||
|
|
||||||
valmap * mapEnvBindings(const Env &env)
|
valmap * mapEnvBindings(const Env &env)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue