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