diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-10-17T14·13+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-10-17T14·13+0000 |
commit | daa8f85fcd3d5d7c48a51305818e05bee866b936 (patch) | |
tree | e4d9e0837e30b27be5f568cfeb53ac3cbb92043f /src/libexpr/get-drvs.cc | |
parent | 24737f279e6f1e0fd079609b9397deb867925324 (diff) |
* Backwards compatibility hack for user environments made by Nix <= 0.10.
Diffstat (limited to 'src/libexpr/get-drvs.cc')
-rw-r--r-- | src/libexpr/get-drvs.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc index acdc0c7b585a..3c7061fcd33a 100644 --- a/src/libexpr/get-drvs.cc +++ b/src/libexpr/get-drvs.cc @@ -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) : ""; } |