Skip to content

Commit 136cc10

Browse files
committed
Restore the hash mismatch activity
1 parent f50117b commit 136cc10

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/libstore/build/derivation-goal.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ Goal::Co DerivationGoal::tryToBuild()
872872
*drvOptions,
873873
inputPaths,
874874
initialOutputs,
875+
act
875876
});
876877
}
877878

src/libstore/unix/build/derivation-builder.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,14 +2709,12 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
27092709
store.printStorePath(drvPath),
27102710
wanted.to_string(HashFormat::SRI, true),
27112711
got.to_string(HashFormat::SRI, true)));
2712-
#if 0 // FIXME
27132712
act->result(resHashMismatch,
27142713
{
27152714
{"storePath", store.printStorePath(drvPath)},
27162715
{"wanted", wanted},
27172716
{"got", got},
27182717
});
2719-
#endif
27202718
}
27212719
if (!newInfo0.references.empty()) {
27222720
auto numViolations = newInfo.references.size();

src/libstore/unix/include/nix/store/build/derivation-builder.hh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ struct DerivationBuilderParams
5858

5959
const BuildMode & buildMode;
6060

61+
/**
62+
* The activity corresponding to the build.
63+
*/
64+
std::unique_ptr<Activity> & act;
65+
6166
DerivationBuilderParams(
6267
const StorePath & drvPath,
6368
const BuildMode & buildMode,
@@ -66,7 +71,8 @@ struct DerivationBuilderParams
6671
const StructuredAttrs * parsedDrv,
6772
const DerivationOptions & drvOptions,
6873
const StorePathSet & inputPaths,
69-
std::map<std::string, InitialOutput> & initialOutputs)
74+
std::map<std::string, InitialOutput> & initialOutputs,
75+
std::unique_ptr<Activity> & act)
7076
: drvPath{drvPath}
7177
, buildResult{buildResult}
7278
, drv{drv}
@@ -75,6 +81,7 @@ struct DerivationBuilderParams
7581
, inputPaths{inputPaths}
7682
, initialOutputs{initialOutputs}
7783
, buildMode{buildMode}
84+
, act{act}
7885
{ }
7986

8087
DerivationBuilderParams(DerivationBuilderParams &&) = default;

0 commit comments

Comments
 (0)