Skip to content

Commit 79211b6

Browse files
authored
Merge pull request #13846 from obsidiansystems/derivation-builder-params-aggregate-initialize
No more `DerivationBuilderParams:` constructor!
2 parents 564593b + f5f9e32 commit 79211b6

File tree

2 files changed

+10
-36
lines changed

2 files changed

+10
-36
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -758,16 +758,16 @@ Goal::Co DerivationBuildingGoal::tryToBuild()
758758
*localStoreP,
759759
std::make_unique<DerivationBuildingGoalCallbacks>(*this, builder),
760760
DerivationBuilderParams{
761-
drvPath,
762-
buildMode,
763-
buildResult,
764-
*drv,
765-
*drvOptions,
766-
inputPaths,
767-
initialOutputs,
768-
std::move(defaultPathsInChroot),
769-
std::move(finalEnv),
770-
std::move(extraFiles),
761+
.drvPath = drvPath,
762+
.buildResult = buildResult,
763+
.drv = *drv,
764+
.drvOptions = *drvOptions,
765+
.inputPaths = inputPaths,
766+
.initialOutputs = initialOutputs,
767+
.buildMode = buildMode,
768+
.defaultPathsInChroot = std::move(defaultPathsInChroot),
769+
.finalEnv = std::move(finalEnv),
770+
.extraFiles = std::move(extraFiles),
771771
});
772772
}
773773

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

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -93,32 +93,6 @@ struct DerivationBuilderParams
9393
* `EnvEntry::nameOfPassAsFile` above.
9494
*/
9595
StringMap extraFiles;
96-
97-
DerivationBuilderParams(
98-
const StorePath & drvPath,
99-
const BuildMode & buildMode,
100-
BuildResult & buildResult,
101-
const Derivation & drv,
102-
const DerivationOptions & drvOptions,
103-
const StorePathSet & inputPaths,
104-
std::map<std::string, InitialOutput> & initialOutputs,
105-
PathsInChroot defaultPathsInChroot,
106-
std::map<std::string, EnvEntry, std::less<>> finalEnv,
107-
StringMap extraFiles)
108-
: drvPath{drvPath}
109-
, buildResult{buildResult}
110-
, drv{drv}
111-
, drvOptions{drvOptions}
112-
, inputPaths{inputPaths}
113-
, initialOutputs{initialOutputs}
114-
, buildMode{buildMode}
115-
, defaultPathsInChroot{std::move(defaultPathsInChroot)}
116-
, finalEnv{std::move(finalEnv)}
117-
, extraFiles{std::move(extraFiles)}
118-
{
119-
}
120-
121-
DerivationBuilderParams(DerivationBuilderParams &&) = default;
12296
};
12397

12498
/**

0 commit comments

Comments
 (0)