* Backwards compatibility hack for user environments made by Nix <= 0.10.

This commit is contained in:
Eelco Dolstra 2006-10-17 14:13:15 +00:00
parent 24737f279e
commit daa8f85fcd

View file

@ -10,6 +10,13 @@ string DrvInfo::queryDrvPath(EvalState & state) const
{
if (drvPath == "") {
Expr a = attrs->get(toATerm("drvPath"));
/* Backwards compatibility hack with user environments made by
Nix <= 0.10: these contain illegal Path("") expressions. */
ATerm t;
if (a && matchPath(evalExpr(state, a), t))
return aterm2String(t);
PathSet context;
(string &) drvPath = a ? coerceToPath(state, a, context) : "";
}