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