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