ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / pyqtwebengine / default.nix
blobc86fe165d4fc2dd074d9d111d1955c476ddbc3cc
1 { lib, pythonPackages, pkg-config
2 , qmake, qtbase, qtsvg, qtwebengine
3 , wrapQtAppsHook
4 }:
6 let
7   inherit (pythonPackages) buildPythonPackage python isPy27 pyqt5 enum34 sip pyqt-builder;
8 in buildPythonPackage rec {
9   pname = "PyQtWebEngine";
10   version = "5.15.4";
11   format = "pyproject";
13   disabled = isPy27;
15   src = pythonPackages.fetchPypi {
16     inherit pname version;
17     sha256 = "06fc35hzg346a9c86dk7vzm1fakkgzn5l52jfq3bix3587sjip6f";
18   };
20   postPatch = ''
21     substituteInPlace pyproject.toml \
22       --replace "[tool.sip.project]" "[tool.sip.project]''\nsip-include-dirs = [\"${pyqt5}/${python.sitePackages}/PyQt5/bindings\"]"
23   '';
25   outputs = [ "out" "dev" ];
27   nativeBuildInputs = [
28     pkg-config
29     qmake
30     sip
31     qtbase
32     qtsvg
33     qtwebengine
34     pyqt-builder
35     pythonPackages.setuptools
36   ];
38   buildInputs = [
39     sip
40     qtbase
41     qtsvg
42     qtwebengine
43   ];
45   propagatedBuildInputs = [ pyqt5 ];
47   dontWrapQtApps = true;
49   # Avoid running qmake, which is in nativeBuildInputs
50   dontConfigure = true;
52   # Checked using pythonImportsCheck
53   doCheck = false;
55   pythonImportsCheck = [
56     "PyQt5.QtWebEngine"
57     "PyQt5.QtWebEngineWidgets"
58   ];
60   enableParallelBuilding = true;
62   passthru = {
63     inherit wrapQtAppsHook;
64   };
66   meta = with lib; {
67     description = "Python bindings for Qt5";
68     homepage    = "http://www.riverbankcomputing.co.uk";
69     license     = licenses.gpl3;
70     platforms   = lib.lists.intersectLists qtwebengine.meta.platforms platforms.mesaPlatforms;
71   };