1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 00:11:17 +02:00

* Handle string contexts. `nix-instantiate' can now correctly compute

the `firefoxWrapper' attribute in Nixpkgs, and it's about 3 times
  faster than the trunk :-)
This commit is contained in:
Eelco Dolstra 2010-03-31 19:52:29 +00:00
parent d8cd3115d8
commit 979f163615
3 changed files with 28 additions and 65 deletions

View file

@ -588,7 +588,7 @@ static void prim_toFile(EvalState & state, Value * * args, Value & v)
{
PathSet context;
string name = state.forceStringNoCtx(*args[0]);
string contents = state.forceString(*args[1]); // !!! context
string contents = state.forceString(*args[1], context);
PathSet refs;
@ -928,7 +928,7 @@ static void prim_toString(EvalState & state, Value * * args, Value & v)
{
PathSet context;
string s = state.coerceToString(*args[0], context, true, false);
mkString(v, s.c_str()); // !!! context
mkString(v, s, context);
}