diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index fda0649de220..9e4beaa0586b 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -165,8 +165,14 @@ stdenv.mkDerivation rec { ++ optional (!enablePam) "--without-pam" ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--bundled-libraries=!asn1_compile,!compile_et" - ] ++ optionals stdenv.isAarch32 [ - # https://bugs.gentoo.org/683148 + ] ++ optionals stdenv.buildPlatform.is32bit [ + # By default `waf configure` spawns as many as available CPUs. On + # 32-bit systems with many CPUs (like `i686` chroot on `x86_64` + # kernel) it can easily exhaust 32-bit address space and hang up: + # https://github.com/NixOS/nixpkgs/issues/287339#issuecomment-1949462057 + # https://bugs.gentoo.org/683148 + # Limit the job count down to the minimal on system with limited address + # space. "--jobs 1" ];