1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pkg-config, 6 lndir, 7 sip, 8 pyqt-builder, 9 qt6Packages, 10 pyqt6, 11 python, 12 mesa, 13}: 14 15buildPythonPackage rec { 16 pname = "pyqt6-webengine"; 17 version = "6.9.0"; 18 pyproject = true; 19 20 src = fetchPypi { 21 pname = "pyqt6_webengine"; 22 inherit version; 23 hash = "sha256-auU347vaBrjgZTXkhSKX4Lw7AFQ8R5KVQfzJsRmBqiU="; 24 }; 25 26 patches = [ 27 ./qvariant.patch 28 ]; 29 30 # fix include path and increase verbosity 31 postPatch = '' 32 sed -i \ 33 '/\[tool.sip.project\]/a\ 34 verbose = true\ 35 sip-include-dirs = [\"${pyqt6}/${python.sitePackages}/PyQt6/bindings\"]' \ 36 pyproject.toml 37 ''; 38 39 enableParallelBuilding = true; 40 # HACK: paralellize compilation of make calls within pyqt's setup.py 41 # pkgs/stdenv/generic/setup.sh doesn't set this for us because 42 # make gets called by python code and not its build phase 43 # format=pyproject means the pip-build-hook hook gets used to build this project 44 # pkgs/development/interpreters/python/hooks/pip-build-hook.sh 45 # does not use the enableParallelBuilding flag 46 postUnpack = '' 47 export MAKEFLAGS+=" -j$NIX_BUILD_CORES" 48 ''; 49 50 outputs = [ 51 "out" 52 "dev" 53 ]; 54 55 dontWrapQtApps = true; 56 57 build-system = [ 58 sip 59 pyqt-builder 60 ]; 61 62 dependencies = [ 63 pyqt6 64 ]; 65 66 nativeBuildInputs = with qt6Packages; [ 67 pkg-config 68 lndir 69 qtwebengine 70 qmake 71 ]; 72 73 buildInputs = with qt6Packages; [ qtwebengine ]; 74 75 passthru = { 76 inherit sip; 77 }; 78 79 dontConfigure = true; 80 81 # Checked using pythonImportsCheck, has no tests 82 83 pythonImportsCheck = [ 84 "PyQt6.QtWebEngineCore" 85 "PyQt6.QtWebEngineQuick" 86 "PyQt6.QtWebEngineWidgets" 87 ]; 88 89 meta = { 90 description = "Python bindings for Qt6 WebEngine"; 91 homepage = "https://riverbankcomputing.com/"; 92 license = lib.licenses.gpl3Only; 93 inherit (mesa.meta) platforms; 94 maintainers = with lib.maintainers; [ 95 LunNova 96 ]; 97 }; 98}