From 879fa969fed2a67acfc06c367ad40b2be98ae7f8 Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Tue, 28 Mar 2023 03:01:02 +0200 Subject: [PATCH] PyQt5: enable parallel building Port the workaround for parallel building from PyQt6 to PyQt5. The initial workaround has been added in commit 1824a128a150d743f1c6614ae849ad64894057a1. --- pkgs/development/python-modules/pyqt/5.x.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index aeb207d294e8..f43038fac296 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -55,6 +55,17 @@ buildPythonPackage rec { EOF ''; + enableParallelBuilding = true; + # HACK: paralellize compilation of make calls within pyqt's setup.py + # pkgs/stdenv/generic/setup.sh doesn't set this for us because + # make gets called by python code and not its build phase + # format=pyproject means the pip-build-hook hook gets used to build this project + # pkgs/development/interpreters/python/hooks/pip-build-hook.sh + # does not use the enableParallelBuilding flag + postUnpack = '' + export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}" + ''; + outputs = [ "out" "dev" ]; dontWrapQtApps = true;