go builder: respect enableParallelBuilding

It was parallelizing for $NIX_BUILD_CORES regardless of
enableParallelBuilding.
This commit is contained in:
Lluís Batlle i Rossell 2016-01-21 15:05:40 +01:00
parent 6349f50bde
commit 082f2e6938

View File

@ -112,6 +112,9 @@ go.stdenv.mkDerivation (
} }
export -f buildGoDir # parallel needs to see the function export -f buildGoDir # parallel needs to see the function
if [ -z "$enableParallelBuilding" ]; then
export NIX_BUILD_CORES=1
fi
getGoDirs "" | parallel -j $NIX_BUILD_CORES buildGoDir install getGoDirs "" | parallel -j $NIX_BUILD_CORES buildGoDir install
runHook postBuild runHook postBuild