You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build-cores: detect cores automatically if set to 0
This changes makes nix detect a machines available cores automatically whenever build-cores is set to 0.
So far, nix simply passed NIX_BUILD_CORES=0 whenever build-cores is set to 0. (only when build-cores is unset it was detecting cores automatically)
The behavior of passing NIX_BUILD_CORES=0 leads to a performance penalty when sourcing nixpkgs' generic builder's `setup.sh`, as setup.sh has to execute `nproc`. This significantly slows down sourcing of setup.sh
This affects all nixos machines since the introduction of the nix settings module a couple releases ago which sets build-cores to 0 be default.
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.
@@ -172,9 +193,7 @@ public:
172
193
>
173
194
> The number of parallel local Nix build jobs is independently controlled with the [`max-jobs`](#conf-max-jobs) setting.
174
195
)",
175
-
{"build-cores"},
176
-
// Don't document the machine-specific default value
177
-
false};
196
+
{"build-cores"}};
178
197
179
198
/**
180
199
* Read-only mode. Don't copy stuff to the store, don't change
0 commit comments