From 222fe563b95464cea880334603dc313ae79b759b Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Mon, 13 Jun 2022 22:51:11 +0200 Subject: [PATCH] palemoon: Limit build cores count Building with too many cores may be the cause of the build flakiness with OfBorg. Upstream says <=32 cores should work fine, let's see if this helps. https://forum.palemoon.org/viewtopic.php?f=5&t=28480 --- .../networking/browsers/palemoon/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/palemoon/default.nix b/pkgs/applications/networking/browsers/palemoon/default.nix index 77419c95eb0a..c4c00d563786 100644 --- a/pkgs/applications/networking/browsers/palemoon/default.nix +++ b/pkgs/applications/networking/browsers/palemoon/default.nix @@ -113,6 +113,13 @@ stdenv.mkDerivation rec { configurePhase = '' runHook preConfigure + # Too many cores can lead to build flakiness + # https://forum.palemoon.org/viewtopic.php?f=5&t=28480 + export jobs=$(($NIX_BUILD_CORES<=32 ? $NIX_BUILD_CORES : 32)) + if [ -z "$enableParallelBuilding" ]; then + jobs=1 + fi + export MOZCONFIG=$PWD/mozconfig export MOZ_NOSPAM=1 @@ -120,7 +127,7 @@ stdenv.mkDerivation rec { export gtkversion=${if withGTK3 then "3" else "2"} export xlibs=${lib.makeLibraryPath [ xorg.libX11 ]} export prefix=$out - export mozmakeflags="-j${if enableParallelBuilding then "$NIX_BUILD_CORES" else "1"}" + export mozmakeflags="-j$jobs" export autoconf=${autoconf213}/bin/autoconf substituteAll ${./mozconfig} $MOZCONFIG