17 withMultimedia ? true,
18 withWebSockets ? true,
20 # Not currently part of PyQt6
21 #, withConnectivity ? true
22 withPrintSupport ? true,
26 buildPythonPackage rec {
28 version = "6.8.0.dev2410141303";
31 disabled = pythonOlder "3.6";
33 # This is dangerous, how can we get web archive to archive the URL?
35 url = "https://riverbankcomputing.com/pypi/packages/PyQt6/PyQt6-${version}.tar.gz";
36 hash = "sha256-eHYqj22us07uFkErJD2d0y0wueZxtQTwTFW9cI7yoK4=";
40 # Fix some wrong assumptions by ./project.py
41 # TODO: figure out how to send this upstream
42 # FIXME: make a version for PyQt6?
43 # ./pyqt5-fix-dbus-mainloop-support.patch
44 # confirm license when installing via pyqt6_sip
45 ./pyqt5-confirm-license.patch
49 # and normalize version
51 cat >> pyproject.toml <<EOF
56 # pythonRelaxDeps doesn't work and the wanted versions are not released AFAIK
57 substituteInPlace pyproject.toml \
58 --replace-fail 'version = "${version}"' 'version = "${lib.versions.pad 3 version}"' \
59 --replace-fail "sip >=6.9, <7" "sip >=6.8.6, <7" \
60 --replace-fail 'PyQt-builder >=1.17, <2' "PyQt-builder >=1.16, <2"
63 enableParallelBuilding = true;
64 # HACK: paralellize compilation of make calls within pyqt's setup.py
65 # pkgs/stdenv/generic/setup.sh doesn't set this for us because
66 # make gets called by python code and not its build phase
67 # format=pyproject means the pip-build-hook hook gets used to build this project
68 # pkgs/development/interpreters/python/hooks/pip-build-hook.sh
69 # does not use the enableParallelBuilding flag
71 export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}"
79 dontWrapQtApps = true;
95 # ++ lib.optional withConnectivity qtconnectivity
96 ++ lib.optional withMultimedia qtmultimedia
97 ++ lib.optional withWebSockets qtwebsockets
98 ++ lib.optional withLocation qtlocation;
111 # ++ lib.optional withConnectivity qtconnectivity
112 ++ lib.optional withWebSockets qtwebsockets
113 ++ lib.optional withLocation qtlocation;
115 propagatedBuildInputs =
121 # ld: library not found for -lcups
122 ++ lib.optionals (withPrintSupport && stdenv.hostPlatform.isDarwin) [ cups ];
125 inherit sip pyqt6-sip;
126 multimediaEnabled = withMultimedia;
127 WebSocketsEnabled = withWebSockets;
130 dontConfigure = true;
132 # Checked using pythonImportsCheck, has no tests
143 ++ lib.optional withWebSockets "PyQt6.QtWebSockets"
144 ++ lib.optional withMultimedia "PyQt6.QtMultimedia"
145 # ++ lib.optional withConnectivity "PyQt6.QtConnectivity"
146 ++ lib.optional withLocation "PyQt6.QtPositioning";
148 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-address-of-temporary";
151 description = "Python bindings for Qt6";
152 homepage = "https://riverbankcomputing.com/";
153 license = licenses.gpl3Only;
154 inherit (mesa.meta) platforms;
155 maintainers = with maintainers; [ LunNova ];