forked from lix-project/lix
* Quick hack to make coerceToString work more or less correctly on
nested lists. `nix-instantiate' can now evaluate the NixOS system derivation attribute correctly (in 2.1s on my laptop vs. 6.2s for the trunk).
This commit is contained in:
parent
7b851915bf
commit
c172274e17
|
@ -804,9 +804,12 @@ string EvalState::coerceToString(Value & v, PathSet & context,
|
|||
if (v.type == tList) {
|
||||
string result;
|
||||
for (unsigned int n = 0; n < v.list.length; ++n) {
|
||||
if (n) result += " ";
|
||||
result += coerceToString(v.list.elems[n],
|
||||
context, coerceMore, copyToStore);
|
||||
if (n < v.list.length - 1
|
||||
/* !!! not quite correct */
|
||||
&& (v.list.elems[n].type != tList || v.list.elems[n].list.length != 0))
|
||||
result += " ";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue