diff --git a/doc/manual/src/release-notes/rl-next.md b/doc/manual/src/release-notes/rl-next.md new file mode 100644 index 000000000..869dcb3be --- /dev/null +++ b/doc/manual/src/release-notes/rl-next.md @@ -0,0 +1,4 @@ +# Release X.Y (202?-??-??) + +- Add a `load-limit` setting to control builder parallelism. This has + also been backported to the 2.18 and later release branches. diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc index 6533b2f58..f94c7ae3f 100644 --- a/src/libstore/daemon.cc +++ b/src/libstore/daemon.cc @@ -199,6 +199,7 @@ struct ClientSettings time_t maxSilentTime; bool verboseBuild; unsigned int buildCores; + std::optional loadLimit; bool useSubstitutes; StringMap overrides; @@ -212,6 +213,7 @@ struct ClientSettings settings.maxSilentTime = maxSilentTime; settings.verboseBuild = verboseBuild; settings.buildCores = buildCores; + settings.loadLimit.assign(loadLimit); settings.useSubstitutes = useSubstitutes; for (auto & i : overrides) { diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index 30d7537bd..2a38920d8 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -166,7 +166,6 @@ public: R"( Sets the value of the `NIX_BUILD_CORES` environment variable in the [invocation of the `builder` executable](@docroot@/language/derivations.md#builder-execution) of a derivation. The `builder` executable can use this variable to control its own maximum amount of parallelism. -