forked from lix-project/lix
* Backwards compatibility hack for user environments made by Nix <= 0.10.
This commit is contained in:
parent
24737f279e
commit
daa8f85fcd
|
@ -10,6 +10,13 @@ string DrvInfo::queryDrvPath(EvalState & state) const
|
||||||
{
|
{
|
||||||
if (drvPath == "") {
|
if (drvPath == "") {
|
||||||
Expr a = attrs->get(toATerm("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;
|
PathSet context;
|
||||||
(string &) drvPath = a ? coerceToPath(state, a, context) : "";
|
(string &) drvPath = a ? coerceToPath(state, a, context) : "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue