1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

Restore the hash mismatch activity

This commit is contained in:
Eelco Dolstra 2025-05-18 13:10:08 +02:00
parent f50117ba4c
commit 136cc106e7
3 changed files with 9 additions and 3 deletions

View file

@ -872,6 +872,7 @@ Goal::Co DerivationGoal::tryToBuild()
*drvOptions,
inputPaths,
initialOutputs,
act
});
}

View file

@ -2709,14 +2709,12 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
store.printStorePath(drvPath),
wanted.to_string(HashFormat::SRI, true),
got.to_string(HashFormat::SRI, true)));
#if 0 // FIXME
act->result(resHashMismatch,
{
{"storePath", store.printStorePath(drvPath)},
{"wanted", wanted},
{"got", got},
});
#endif
}
if (!newInfo0.references.empty()) {
auto numViolations = newInfo.references.size();

View file

@ -58,6 +58,11 @@ struct DerivationBuilderParams
const BuildMode & buildMode;
/**
* The activity corresponding to the build.
*/
std::unique_ptr<Activity> & act;
DerivationBuilderParams(
const StorePath & drvPath,
const BuildMode & buildMode,
@ -66,7 +71,8 @@ struct DerivationBuilderParams
const StructuredAttrs * parsedDrv,
const DerivationOptions & drvOptions,
const StorePathSet & inputPaths,
std::map<std::string, InitialOutput> & initialOutputs)
std::map<std::string, InitialOutput> & initialOutputs,
std::unique_ptr<Activity> & act)
: drvPath{drvPath}
, buildResult{buildResult}
, drv{drv}
@ -75,6 +81,7 @@ struct DerivationBuilderParams
, inputPaths{inputPaths}
, initialOutputs{initialOutputs}
, buildMode{buildMode}
, act{act}
{ }
DerivationBuilderParams(DerivationBuilderParams &&) = default;