mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
* Quick hack to fix NIX-67: evaluation result differing if the Nix
expression resides in the store.
This commit is contained in:
parent
bd0c40e1e9
commit
0c4c5c2020
2 changed files with 16 additions and 13 deletions
|
@ -159,8 +159,15 @@ void toString(EvalState & state, Expr e,
|
|||
else if (matchPath(e, s)) {
|
||||
Path path(canonPath(aterm2String(s)));
|
||||
|
||||
if (!isInStore(path)) {
|
||||
if (isStorePath(path) || (isWrapped && isInStore(path))) {
|
||||
result += path;
|
||||
/* !!! smells hacky. Check whether this is the Right
|
||||
Thing To Do. */
|
||||
if (!isWrapped)
|
||||
context = ATinsert(context, makePath(toATerm(toStorePath(path))));
|
||||
}
|
||||
|
||||
else {
|
||||
if (isDerivation(path))
|
||||
throw EvalError(format("file names are not allowed to end in `%1%'")
|
||||
% drvExtension);
|
||||
|
@ -178,14 +185,6 @@ void toString(EvalState & state, Expr e,
|
|||
result += dstPath;
|
||||
context = ATinsert(context, makePath(toATerm(dstPath)));
|
||||
}
|
||||
|
||||
else {
|
||||
result += path;
|
||||
/* !!! smells hacky. Check whether this is the Right
|
||||
Thing To Do. */
|
||||
if (!isWrapped)
|
||||
context = ATinsert(context, makePath(toATerm(toStorePath(path))));
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchList(e, es)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue