Hi all!
You might know that stdenv.mkDerivation
has support for parallel builds via enableParallelBuilding = true;
attribute (NixOS - Nixpkgs 21.05 manual). For some build systems the attribute is already set by default. But it’s not set for autotools-based systems. Only a few large packages opt into parallel builds. I happened to notice that coreutils
and bison
didn’t and enabled them explicitly. I would say enableParallelBuilding = false;
is a wrong default for today’s multicore systems.
What would be the path to enable enableParallelBuilding = true;
by default in nixpkgs
?
It’s a disruptive change. I expect up to 1% of packages to start failing the build once it’s enabled. I fixed all the packages I found that are part of my desktop NixOS system.
How that kind of changes is usually introduced in nixpkgs
? Caveat: I plan to do something similar with gcc-11
and with -fno-common
workaround removal. Both are guaranteed to produce comparable fallout once enabled by default.
I personally can’t realistically fix (or even find) 100s of newly failing packages myself. Ideally I would like package maintainers to help me. Does nixpkgs
and/or Hydra have an infrastructure to do such kinds of change? Other distributions usually use bug trackers and bots to auto-file bugs and CC maintainers.
Want to try out parallel builds yourself (or maybe fix a package or two)?
- recently fixed (and unfixed!) packages: Enable parallel builds by default (at least `enableParallelBuilding = true`) · Issue #142338 · NixOS/nixpkgs · GitHub
- actual two-liner change: RFC: stdenv: enable parallel builds by default in make-derivation.nix by trofi · Pull Request #142904 · NixOS/nixpkgs · GitHub