python3Packages.scipy: Fix OMP_NUM_THREADS going 0

If NIX_BUILD_CORES < 4:

  libgomp: Invalid value for environment variable OMP_NUM_THREADS: 0
This commit is contained in:
OPNA2608
2025-11-29 14:31:21 +01:00
committed by Martin Weinelt
parent 6f4c7157bc
commit e09e378ad0
@@ -193,6 +193,10 @@ buildPythonPackage (finalAttrs: {
preCheck = ''
export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 ))
if [ $OMP_NUM_THREADS -eq 0 ]; then
export OMP_NUM_THREADS=1
fi
cd $out
'';