mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
* Backwards compatibility hack for user environments made by Nix <= 0.10.
This commit is contained in:
parent
24737f279e
commit
daa8f85fcd
1 changed files with 7 additions and 0 deletions
|
@ -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) : "";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue