mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 23:12:44 +01:00
Move runPostBuildHook out of DerivationBuilder
It is suppposed to be "post build" not "during the build" after all. Its location now matches that for the hook case (see elsewhere in `DerivationdBuildingGoal`). It was in a try-catch before, and now it isn't, but I believe that it is impossible for it to throw `BuildError`, which is sufficient for this code motion to be correct.
This commit is contained in:
parent
c1e2396d58
commit
0250d50df3
4 changed files with 9 additions and 12 deletions
|
|
@ -506,11 +506,6 @@ std::variant<std::pair<BuildResult::Status, Error>, SingleDrvOutputs> Derivation
|
|||
being valid. */
|
||||
auto builtOutputs = registerOutputs();
|
||||
|
||||
StorePathSet outputPaths;
|
||||
for (auto & [_, output] : builtOutputs)
|
||||
outputPaths.insert(output.outPath);
|
||||
runPostBuildHook(store, *logger, drvPath, outputPaths);
|
||||
|
||||
/* Delete unused redirected outputs (when doing hash rewriting). */
|
||||
for (auto & i : redirectedOutputs)
|
||||
deletePath(store.Store::toRealPath(i.second));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue