git: fix checks by limiting build cores (#403237)

This commit is contained in:
Jörg Thalheim
2025-05-01 10:28:47 +02:00
committed by GitHub
@@ -456,6 +456,12 @@ stdenv.mkDerivation (finalAttrs: {
preInstallCheck =
''
# Some tests break with high concurrency
# https://github.com/NixOS/nixpkgs/pull/403237
if ((NIX_BUILD_CORES > 32)); then
NIX_BUILD_CORES=32
fi
installCheckFlagsArray+=(
GIT_PROVE_OPTS="--jobs $NIX_BUILD_CORES --failures --state=failed,save"
GIT_TEST_INSTALLED=$out/bin