diff --git a/src/libstore/build/derivation-building-goal.cc b/src/libstore/build/derivation-building-goal.cc index d07beb9ec..025e995f2 100644 --- a/src/libstore/build/derivation-building-goal.cc +++ b/src/libstore/build/derivation-building-goal.cc @@ -155,6 +155,12 @@ Goal::Co DerivationBuildingGoal::gaveUpOnSubstitution(bool storeDerivation) /* Determine the full set of input paths. */ + /** + * All input paths (that is, the union of FS closures of the + * immediate input paths). + */ + StorePathSet inputPaths; + if (storeDerivation) { assert(drv->inputDrvs.map.empty()); /* Store the resolved derivation, as part of the record of @@ -348,7 +354,7 @@ tryToBuild: if (buildLocally) { useHook = false; } else { - switch (tryBuildHook(initialOutputs)) { + switch (tryBuildHook(inputPaths, initialOutputs)) { case rpAccept: /* Yes, it has started doing so. Wait until we get EOF from the hook. */ @@ -801,7 +807,8 @@ BuildError DerivationBuildingGoal::fixupBuilderFailureErrorMessage(BuilderFailur return BuildError{e.status, msg}; } -HookReply DerivationBuildingGoal::tryBuildHook(const std::map & initialOutputs) +HookReply DerivationBuildingGoal::tryBuildHook( + const StorePathSet & inputPaths, const std::map & initialOutputs) { #ifdef _WIN32 // TODO enable build hook on Windows return rpDecline; diff --git a/src/libstore/include/nix/store/build/derivation-building-goal.hh b/src/libstore/include/nix/store/build/derivation-building-goal.hh index 1f2a57d86..ac5bd43f6 100644 --- a/src/libstore/include/nix/store/build/derivation-building-goal.hh +++ b/src/libstore/include/nix/store/build/derivation-building-goal.hh @@ -58,12 +58,6 @@ private: * The remainder is state held during the build. */ - /** - * All input paths (that is, the union of FS closures of the - * immediate input paths). - */ - StorePathSet inputPaths; - /** * File descriptor for the log file. */ @@ -114,7 +108,8 @@ private: /** * Is the build hook willing to perform the build? */ - HookReply tryBuildHook(const std::map & initialOutputs); + HookReply + tryBuildHook(const StorePathSet & inputPaths, const std::map & initialOutputs); /** * Open a log file and a pipe to it.