Skip to content

Commit 8ac0876

Browse files
committed
DerivationBuildingGoal::inputPaths make local variable
1 parent 2bab526 commit 8ac0876

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/libstore/build/derivation-building-goal.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ Goal::Co DerivationBuildingGoal::gaveUpOnSubstitution()
238238

239239
/* Determine the full set of input paths. */
240240

241+
/**
242+
* All input paths (that is, the union of FS closures of the
243+
* immediate input paths).
244+
*/
245+
StorePathSet inputPaths;
246+
241247
/* First, the input derivations. */
242248
{
243249
auto & fullDrv = *drv;
@@ -553,7 +559,7 @@ Goal::Co DerivationBuildingGoal::gaveUpOnSubstitution()
553559
if (buildLocally) {
554560
useHook = false;
555561
} else {
556-
switch (tryBuildHook()) {
562+
switch (tryBuildHook(inputPaths)) {
557563
case rpAccept:
558564
/* Yes, it has started doing so. Wait until we get
559565
EOF from the hook. */
@@ -957,7 +963,7 @@ BuildError DerivationBuildingGoal::fixupBuilderFailureErrorMessage(BuilderFailur
957963
return BuildError{e.status, msg};
958964
}
959965

960-
HookReply DerivationBuildingGoal::tryBuildHook()
966+
HookReply DerivationBuildingGoal::tryBuildHook(const StorePathSet & inputPaths)
961967
{
962968
#ifdef _WIN32 // TODO enable build hook on Windows
963969
return rpDecline;

src/libstore/include/nix/store/build/derivation-building-goal.hh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ private:
4949
* The remainder is state held during the build.
5050
*/
5151

52-
/**
53-
* All input paths (that is, the union of FS closures of the
54-
* immediate input paths).
55-
*/
56-
StorePathSet inputPaths;
57-
5852
std::map<std::string, InitialOutput> initialOutputs;
5953

6054
/**
@@ -107,7 +101,7 @@ private:
107101
/**
108102
* Is the build hook willing to perform the build?
109103
*/
110-
HookReply tryBuildHook();
104+
HookReply tryBuildHook(const StorePathSet & inputPaths);
111105

112106
/**
113107
* Open a log file and a pipe to it.

0 commit comments

Comments
 (0)