aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2021-01-08 22:09:35 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2021-04-13 23:12:38 +0200
commit3550a32b25068aa8b1670ef7fd2af2b821f35dc1 (patch)
treeadb66b82c9e678639c0a71d3252365879ce139db /src/libexpr
parent525015be7f908876e04e8d99c26b9ba8d13fb5d7 (diff)
primops/derivation: use position of currently evaluated attribute
* The position of the `name`-attribute appears in the trace. * If e.g. `meta` has no `outPath`-attribute, a `cannot coerce set to string` error will be thrown where `pos` points to `name =` which is highly misleading.
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 428adf4c2..f9eefddd0 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -953,7 +953,7 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * *
}
} else {
- auto s = state.coerceToString(posDrvName, *i->value, context, true);
+ auto s = state.coerceToString(*i->pos, *i->value, context, true);
drv.env.emplace(key, s);
if (i->name == state.sBuilder) drv.builder = s;
else if (i->name == state.sSystem) drv.platform = s;