From fad244725fe00fc8e4c05b35ae03316e4a2bca5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 10 Dec 2023 09:17:51 +0100 Subject: [PATCH] print which derivation failed to evaluate --- src/nix-eval-jobs.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index ec5ff34..56b6c49 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -203,7 +203,7 @@ struct Drv { std::map> inputDrvs; std::optional meta; - Drv(EvalState &state, DrvInfo &drvInfo) { + Drv(std::string &attrPath, EvalState &state, DrvInfo &drvInfo) { auto localStore = state.store.dynamic_pointer_cast(); @@ -214,7 +214,8 @@ struct Drv { localStore->printStorePath(*out.second); } } catch (const std::exception &e) { - throw EvalError("derivation must have valid outputs: %s", e.what()); + throw EvalError("derivation '%s' does not have valid outputs: %s", + attrPath, e.what()); } if (myArgs.meta) { @@ -326,7 +327,7 @@ static void worker(ref state, Bindings &autoArgs, AutoCloseFD &to, if (v->type() == nAttrs) { if (auto drvInfo = getDerivation(*state, *v, false)) { - auto drv = Drv(*state, *drvInfo); + auto drv = Drv(attrPathS, *state, *drvInfo); reply.update(drv); /* Register the derivation as a GC root. !!! This