From 8660a09197d6cab162169ab9c0be3c8c0faa3e04 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 9 Apr 2022 19:17:57 -0700 Subject: [PATCH] qtbase: use more than one core to build `qmake` The qtbase package's `configurePhase` builds the `qmake` tool. In the current nixpkgs expression it does this single-threadedly, by invoking `make` without a `-j` flag. Let's thread `NIX_BUILD_CORES` through to `./configure`'s invocation of `make` via the `MAKEFLAGS` variable. Co-authored-by: Sandro --- pkgs/development/libraries/qt-5/modules/qtbase.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 0222a708bb87d..0e5b0321a84cd 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -151,6 +151,9 @@ stdenv.mkDerivation { ''} NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\"" + + # paralellize compilation of qtmake, which happens within ./configure + export MAKEFLAGS+=" -j$NIX_BUILD_CORES" '' + lib.optionalString (compareVersion "5.15.0" >= 0) '' ./bin/syncqt.pl -version $version '';