diff options
Diffstat (limited to 'src/libstore/build/local-derivation-goal.cc')
-rw-r--r-- | src/libstore/build/local-derivation-goal.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index 968f669ec..1dd2ad8aa 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -2546,9 +2546,12 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs() /* Throw an error after registering the path as valid. */ worker.hashMismatch = true; + // XXX: shameless layering violation hack that makes the hash mismatch error at least not utterly worthless + auto guessedUrl = getOr(drv->env, "urls", getOr(drv->env, "url", "(unknown)")); delayedException = std::make_exception_ptr( - BuildError("hash mismatch in fixed-output derivation '%s':\n specified: %s\n got: %s", + BuildError("hash mismatch in fixed-output derivation '%s':\n likely URL: %s\n specified: %s\n got: %s", worker.store.printStorePath(drvPath), + guessedUrl, wanted.to_string(SRI, true), got.to_string(SRI, true))); } |