Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pyqt6-webengine / default.nix
blob637a686f00cbc9e8a2705c9daf3ebd0cfe16c3b7
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.6.0";
17   format = "pyproject";
19   disabled = pythonOlder "3.6";
21   src = fetchPypi {
22     pname = "PyQt6_WebEngine";
23     inherit version;
24     hash = "sha256-1QuYTD+F5AnmkrFWEychUi1OjPm2wl4M+Sfuot+zlIc=";
25   };
27   # fix include path and increase verbosity
28   postPatch = ''
29     sed -i \
30       '/\[tool.sip.project\]/a\
31       verbose = true\
32       sip-include-dirs = [\"${pyqt6}/${python.sitePackages}/PyQt6/bindings\"]' \
33       pyproject.toml
34   '';
36   enableParallelBuilding = true;
37   # HACK: paralellize compilation of make calls within pyqt's setup.py
38   # pkgs/stdenv/generic/setup.sh doesn't set this for us because
39   # make gets called by python code and not its build phase
40   # format=pyproject means the pip-build-hook hook gets used to build this project
41   # pkgs/development/interpreters/python/hooks/pip-build-hook.sh
42   # does not use the enableParallelBuilding flag
43   postUnpack = ''
44     export MAKEFLAGS+=" -j$NIX_BUILD_CORES"
45   '';
47   outputs = [ "out" "dev" ];
49   dontWrapQtApps = true;
51   nativeBuildInputs = with qt6Packages; [
52     pkg-config
53     lndir
54     sip
55     qtwebengine
56     qmake
57     pyqt-builder
58   ];
60   buildInputs = with qt6Packages; [
61     qtwebengine
62   ];
64   propagatedBuildInputs = [
65     pyqt6
66   ];
68   passthru = {
69     inherit sip;
70   };
72   dontConfigure = true;
74   # Checked using pythonImportsCheck, has no tests
75   doCheck = true;
77   pythonImportsCheck = [
78     "PyQt6.QtWebEngineCore"
79     "PyQt6.QtWebEngineQuick"
80     "PyQt6.QtWebEngineWidgets"
81   ];
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; [ LunNova nrdxp ];
89   };