libexpr: include the type of the non-derivation value in the type error

Change-Id: Id4717b5b0df7c09b0dbf17e642d8713a0a3efbae
This commit is contained in:
Qyriad 2024-07-07 18:45:06 -06:00
parent 5ffed6d06a
commit 4f6a3d7e9e

View file

@ -447,7 +447,8 @@ static void getDerivations(EvalState & state, Value & vIn,
return;
} else if (v.type() != nAttrs) {
state.error<TypeError>(
"expression does not evaluate to a derivation (or a list or set of those)"
"expression was expected to be a derivation or collection of derivations, but instead was %s",
showType(v.type(), true)
).debugThrow();
}