diff --git a/pkgs/applications/audio/cdparanoia/default.nix b/pkgs/applications/audio/cdparanoia/default.nix index e4589bc48887..6fa69beee20e 100644 --- a/pkgs/applications/audio/cdparanoia/default.nix +++ b/pkgs/applications/audio/cdparanoia/default.nix @@ -6,8 +6,6 @@ stdenv.mkDerivation { url = http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-alpha9.8.src.tgz; md5 = "7218e778b5970a86c958e597f952f193"; }; - - NO_PARALLEL_BUILD_buildPhase = 1; patches = [./fix.patch]; diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 3607d9493864..da7e72669c6c 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -74,6 +74,4 @@ stdenv.mkDerivation rec { maintainers = [ stdenv.lib.maintainers.eelco ]; platforms = stdenv.lib.platforms.all; }; - - NO_PARALLEL_BUILD_installPhase = 1; } diff --git a/pkgs/desktops/gnome-2.28/desktop/gnome-doc-utils/default.nix b/pkgs/desktops/gnome-2.28/desktop/gnome-doc-utils/default.nix index 8b88b6f648e9..c2e49deb009e 100644 --- a/pkgs/desktops/gnome-2.28/desktop/gnome-doc-utils/default.nix +++ b/pkgs/desktops/gnome-2.28/desktop/gnome-doc-utils/default.nix @@ -14,6 +14,4 @@ stdenv.mkDerivation { wrapProgram $out/bin/xml2po --prefix PYTHONPATH : $(toPythonPath $out) \ ''${PYTHONPATH:+ --prefix PYTHONPATH : $PYTHONPATH} \ ''; - - NO_PARALLEL_BUILD_buildPhase = 1; } diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix index 098e82861b3f..33260cd5469a 100644 --- a/pkgs/development/compilers/haxe/default.nix +++ b/pkgs/development/compilers/haxe/default.nix @@ -55,8 +55,6 @@ let inherit zlib; - NUM_CORES = 1; - buildPhase = '' set -x mkdir -p ocaml/{swflib,extc,extlib-dev,xml-light} neko/libs diff --git a/pkgs/development/compilers/neko/default.nix b/pkgs/development/compilers/neko/default.nix index 505a7c3256a0..ee8474947f85 100644 --- a/pkgs/development/compilers/neko/default.nix +++ b/pkgs/development/compilers/neko/default.nix @@ -70,7 +70,4 @@ composableDerivation {} ( fixed : { # TODO make them optional and make them work patches = [ ./disable-modules.patch ]; - - NUM_CORES = 1; - }) diff --git a/pkgs/development/compilers/ocaml/3.08.0.nix b/pkgs/development/compilers/ocaml/3.08.0.nix index 1625e4c55346..b2e7e131a817 100644 --- a/pkgs/development/compilers/ocaml/3.08.0.nix +++ b/pkgs/development/compilers/ocaml/3.08.0.nix @@ -7,7 +7,6 @@ stdenv.mkDerivation { url = http://nixos.org/tarballs/ocaml-3.08.0.tar.gz; md5 = "c6ef478362295c150101cdd2efcd38e0"; }; - NUM_CORES = 1; # both fail: build and install configureScript = ./configure-3.08.0; dontAddPrefix = "True"; configureFlags = ["-no-tk" "-x11lib" x11]; diff --git a/pkgs/development/compilers/ocaml/3.09.1.nix b/pkgs/development/compilers/ocaml/3.09.1.nix index 9c5f7b288cee..6e9922ccc366 100644 --- a/pkgs/development/compilers/ocaml/3.09.1.nix +++ b/pkgs/development/compilers/ocaml/3.09.1.nix @@ -7,7 +7,6 @@ stdenv.mkDerivation { url = http://caml.inria.fr/pub/distrib/ocaml-3.09/ocaml-3.09.1.tar.gz; md5 = "c73f4b093e27ba5bf13d62923f89befc"; }; - NUM_CORES = 1; # both fail: build and install configureScript = ./configure-3.09.1; dontAddPrefix = "True"; configureFlags = ["-no-tk" "-x11lib" x11]; diff --git a/pkgs/development/compilers/ocaml/3.10.0.nix b/pkgs/development/compilers/ocaml/3.10.0.nix index bc92ab1b6897..8a8ddd7ee975 100644 --- a/pkgs/development/compilers/ocaml/3.10.0.nix +++ b/pkgs/development/compilers/ocaml/3.10.0.nix @@ -9,8 +9,6 @@ stdenv.mkDerivation (rec { sha256 = "1ihmx1civ78s7k2hfc05z1s9vbyx2qw7fg8lnbxnfd6zxkk8878d"; }; - NUM_CORES = 1; # both fail: build and install - prefixKey = "-prefix "; configureFlags = ["-no-tk" "-x11lib" x11]; buildFlags = "world bootstrap world.opt"; diff --git a/pkgs/development/compilers/ocaml/3.11.1.nix b/pkgs/development/compilers/ocaml/3.11.1.nix index 901928ec125f..c825830e43d9 100644 --- a/pkgs/development/compilers/ocaml/3.11.1.nix +++ b/pkgs/development/compilers/ocaml/3.11.1.nix @@ -14,8 +14,6 @@ stdenv.mkDerivation (rec { sha256 = "8c36a28106d4b683a15c547dfe4cb757a53fa9247579d1cc25bd06a22cc62e50"; }; - NUM_CORES = 1; # both fail: build and install - prefixKey = "-prefix "; configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ]; buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt"; diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix index 1c82284783a0..f5fed1e16049 100644 --- a/pkgs/development/libraries/gobject-introspection/default.nix +++ b/pkgs/development/libraries/gobject-introspection/default.nix @@ -8,8 +8,6 @@ in stdenv.mkDerivation rec { name = "${baseName}-${v}"; - NO_PARALLEL_BUILD_buildPhase = 1; - buildInputs = [ flex bison glib pkgconfig python cairo ]; propagatedBuildInputs = [ libffi ]; configureFlags = "--enable-gcov"; diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix index 2d1c967e692e..a51c355b6448 100644 --- a/pkgs/development/libraries/nss/default.nix +++ b/pkgs/development/libraries/nss/default.nix @@ -19,8 +19,6 @@ stdenv.mkDerivation { buildInputs = [nspr perl zlib]; - NO_PARALLEL_BUILD_buildPhase = 1; - # Based on the build instructions at # http://www.mozilla.org/projects/security/pki/nss/nss-3.11.4/nss-3.11.4-build.html diff --git a/pkgs/development/libraries/openssl/1.x.nix b/pkgs/development/libraries/openssl/1.x.nix index c64baa17431f..eae32de30e48 100644 --- a/pkgs/development/libraries/openssl/1.x.nix +++ b/pkgs/development/libraries/openssl/1.x.nix @@ -14,8 +14,6 @@ stdenv.mkDerivation (rec { sha1 = "3f800ea9fa3da1c0f576d689be7dca3d55a4cb62"; }; - NO_PARALLEL_BUILD_buildPhase = 1; - buildNativeInputs = [ perl ]; configureScript = "./config"; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 556b5079ea0d..4e567cf6577b 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -14,8 +14,6 @@ stdenv.mkDerivation ( rec { sha256 = "008z1h09pa6dfxs4wgbqj5i1clw4v82b1waqvwanb1kb6wlbq6mh"; }; - NO_PARALLEL_BUILD_buildPhase = 1; - buildNativeInputs = [ perl ]; configureScript = "./config"; diff --git a/pkgs/development/libraries/pth/default.nix b/pkgs/development/libraries/pth/default.nix index 875123a1c33f..631a76224062 100644 --- a/pkgs/development/libraries/pth/default.nix +++ b/pkgs/development/libraries/pth/default.nix @@ -11,7 +11,4 @@ stdenv.mkDerivation rec { description = "The GNU Portable Threads"; homepage = http://www.gnu.org/software/pth; }; - - NO_PARALLEL_BUILD_buildPhase = 1; - NO_PARALLEL_BUILD_installPhase = 1; } diff --git a/pkgs/development/libraries/slang/default.nix b/pkgs/development/libraries/slang/default.nix index 37ead3fb9eb6..a7db634dbd04 100644 --- a/pkgs/development/libraries/slang/default.nix +++ b/pkgs/development/libraries/slang/default.nix @@ -14,5 +14,4 @@ stdenv.mkDerivation { ''; configureFlags = "--with-png=${libpng} --with-z=${zlib} --with-pcre=${pcre} --with-readline=${readline}"; buildInputs = [ncurses pcre libpng zlib readline]; - NO_PARALLEL_BUILD_installPhase = 1; } diff --git a/pkgs/development/tools/parsing/flex/flex-2.5.33.nix b/pkgs/development/tools/parsing/flex/flex-2.5.33.nix index 18ae038c8cfb..9be98689aeaa 100644 --- a/pkgs/development/tools/parsing/flex/flex-2.5.33.nix +++ b/pkgs/development/tools/parsing/flex/flex-2.5.33.nix @@ -17,5 +17,4 @@ stdenv.mkDerivation { meta = { description = "A fast lexical analyser generator"; }; - NO_PARALLEL_BUILD_installPhase = 1; } diff --git a/pkgs/development/tools/parsing/flex/flex-2.5.34.nix b/pkgs/development/tools/parsing/flex/flex-2.5.34.nix index d5a409a062c9..d56cf0c88a2e 100644 --- a/pkgs/development/tools/parsing/flex/flex-2.5.34.nix +++ b/pkgs/development/tools/parsing/flex/flex-2.5.34.nix @@ -16,5 +16,4 @@ stdenv.mkDerivation { meta = { description = "A fast lexical analyser generator"; }; - NO_PARALLEL_BUILD_installPhase = 1; } diff --git a/pkgs/development/tools/parsing/flex/flex-2.5.35.nix b/pkgs/development/tools/parsing/flex/flex-2.5.35.nix index b9fe7e28cda0..c200e4e7d2f7 100644 --- a/pkgs/development/tools/parsing/flex/flex-2.5.35.nix +++ b/pkgs/development/tools/parsing/flex/flex-2.5.35.nix @@ -16,5 +16,4 @@ stdenv.mkDerivation { meta = { description = "A fast lexical analyser generator"; }; - NO_PARALLEL_BUILD_installPhase = 1; } diff --git a/pkgs/development/tools/parsing/flex/flex-2.5.4a.nix b/pkgs/development/tools/parsing/flex/flex-2.5.4a.nix index bca60808600c..13bb68349790 100644 --- a/pkgs/development/tools/parsing/flex/flex-2.5.4a.nix +++ b/pkgs/development/tools/parsing/flex/flex-2.5.4a.nix @@ -9,5 +9,4 @@ stdenv.mkDerivation { md5 = "bd8753d0b22e1f4ec87a553a73021adf"; }; buildInputs = [yacc]; - NO_PARALLEL_BUILD_installPhase = 1; } diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 5a92f2d33bf8..5e2fc7b24dbe 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -73,25 +73,6 @@ addToSearchPath() { addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@" } -cmd(){ - echo "cmd: $@" - "$@" -} - -runMake(){ - local optout=NO_PARALLEL_BUILD_${curPhase} - [ -n "${!optout}" ] || \ - local j="$makeFlagsParallelBuild" - cmd make ${makefile:+-f $makefile} "$@" $j -} - -###################################################################### -# parallel builds: opt-out -# - in a phase: set NO_PARALLEL_BUILD_${PHASE_NAME} -# - for this build: pass NUM_CORES=1 to the builder -if [ "$NUM_CORES" != 1 ]; then - makeFlagsParallelBuild="-j ${NIX_MAX_PARALLELIZATION:-1} ${NIX_TARGET_LOAD:+-l} $NIX_TARGET_LOAD" -fi ###################################################################### # Initialisation. @@ -620,7 +601,9 @@ buildPhase() { return fi - runMake $makeFlags "${makeFlagsArray[@]}" \ + echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}" + make ${makefile:+-f $makefile} \ + $makeFlags "${makeFlagsArray[@]}" \ $buildFlags "${buildFlagsArray[@]}" runHook postBuild @@ -630,7 +613,9 @@ buildPhase() { checkPhase() { runHook preCheck - runMake $makeFlags "${makeFlagsArray[@]}" \ + echo "check flags: $makeFlags ${makeFlagsArray[@]} $checkFlags ${checkFlagsArray[@]}" + make ${makefile:+-f $makefile} \ + $makeFlags "${makeFlagsArray[@]}" \ $checkFlags "${checkFlagsArray[@]}" ${checkTarget:-check} runHook postCheck @@ -678,7 +663,8 @@ installPhase() { ensureDir "$prefix" installTargets=${installTargets:-install} - runMake $installTargets \ + echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}" + make ${makefile:+-f $makefile} $installTargets \ $makeFlags "${makeFlagsArray[@]}" \ $installFlags "${installFlagsArray[@]}" @@ -754,7 +740,8 @@ fixupPhase() { distPhase() { runHook preDist - runMake $distFlags "${distFlagsArray[@]}" ${distTarget:-dist} + echo "dist flags: $distFlags ${distFlagsArray[@]}" + make ${makefile:+-f $makefile} $distFlags "${distFlagsArray[@]}" ${distTarget:-dist} if test "$dontCopyDist" != 1; then ensureDir "$out/tarballs" diff --git a/pkgs/tools/graphics/pstoedit/default.nix b/pkgs/tools/graphics/pstoedit/default.nix index 703811e6bfe1..6f4a41d24251 100644 --- a/pkgs/tools/graphics/pstoedit/default.nix +++ b/pkgs/tools/graphics/pstoedit/default.nix @@ -17,6 +17,4 @@ stdenv.mkDerivation { platforms = args.lib.platforms.linux; }; - NUM_CORES = 1; - } diff --git a/pkgs/tools/package-management/nix/num-cores.patch b/pkgs/tools/package-management/nix/num-cores.patch deleted file mode 100644 index 1b82631bd30d..000000000000 --- a/pkgs/tools/package-management/nix/num-cores.patch +++ /dev/null @@ -1,31 +0,0 @@ -commit b77e3721f19b4e5084125eb8dc7186117004dd4b -Author: Marc Weber -Date: Sun Jun 13 23:53:46 2010 +0200 - - generic/setup.sh: add -j (+1) -l (*2) options to make depending on $NUM_CORES - -diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh -index a9f4d4d..685c0ec 100644 ---- a/pkgs/stdenv/generic/setup.sh -+++ b/pkgs/stdenv/generic/setup.sh -@@ -79,9 +79,19 @@ cmd(){ - } - - runMake(){ -- cmd make ${makefile:+-f $makefile} "$@" -+ local optout=NO_PARALLEL_BUILD_${curPhase} -+ [ -n "${!optout}" ] || \ -+ local j="$makeFlagsParallelBuild" -+ cmd make ${makefile:+-f $makefile} "$@" $j - } - -+###################################################################### -+# parallel builds: opt-out -+# - in a phase: set NO_PARALLEL_BUILD_${PHASE_NAME} -+# - for this build: pass NUM_CORES=1 to the builder -+if [ "$NUM_CORES" -gt 1 ]; then -+ makeFlagsParallelBuild="-j $(( $NUM_CORES + 1 )) -l $(( 2 * $NUM_CORES ))" -+fi - - ###################################################################### - # Initialisation. diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix index f1c28d17713e..f45172ba426e 100644 --- a/pkgs/tools/package-management/nix/unstable.nix +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -40,6 +40,4 @@ stdenv.mkDerivation rec { homepage = http://nixos.org/; license = "LGPLv2+"; }; - - patches = [ ./num-cores.patch ]; } diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b3f3dbca5e61..dadc86907963 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -2858,7 +2858,6 @@ rec { }; XMLSAX = buildPerlPackage { - NUM_CORES=1; name = "XML-SAX-0.96"; src = fetchurl { url = mirror://cpan/authors/id/G/GR/GRANTM/XML-SAX-0.96.tar.gz;