mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
* 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
1 changed files with 4 additions and 1 deletions
|
@ -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