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
This commit is contained in:
OPNA2608
2022-06-13 22:51:17 +02:00
parent 77c7a237fa
commit 222fe563b9
@@ -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