Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #51846 from veprbl/pr/pyqt5_opt_qtwebkit

pyqt5: make qtwebkit optional, disable by default

authored by

Frederik Rietdijk and committed by
GitHub
26e5c0f0 eb97f453

+39 -36
+1 -1
pkgs/applications/audio/cadence/default.nix
··· 25 DESTDIR=$(out) 26 ''; 27 28 - propagatedBuildInputs = with python3Packages; [ pyqt5 ]; 29 30 postInstall = '' 31 # replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise
··· 25 DESTDIR=$(out) 26 ''; 27 28 + propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit ]; 29 30 postInstall = '' 31 # replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise
+2 -2
pkgs/applications/misc/calibre/default.nix
··· 23 ] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch; 24 25 prePatch = '' 26 - sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5}/share/sip/PyQt5':" \ 27 setup/build_environment.py 28 29 # Remove unneeded files and libs ··· 42 fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook 43 ] ++ (with python2Packages; [ 44 apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow 45 - python pyqt5 sip 46 regex msgpack 47 # the following are distributed with calibre, but we use upstream instead 48 odfpy
··· 23 ] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch; 24 25 prePatch = '' 26 + sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5_with_qtwebkit}/share/sip/PyQt5':" \ 27 setup/build_environment.py 28 29 # Remove unneeded files and libs ··· 42 fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook 43 ] ++ (with python2Packages; [ 44 apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow 45 + python pyqt5_with_qtwebkit sip 46 regex msgpack 47 # the following are distributed with calibre, but we use upstream instead 48 odfpy
+1 -6
pkgs/applications/networking/browsers/qutebrowser/default.nix
··· 4 , libxslt, gst_all_1 ? null 5 , withPdfReader ? true 6 , withMediaPlayback ? true 7 - , withWebEngineDefault ? true 8 }: 9 10 assert withMediaPlayback -> gst_all_1 != null; ··· 39 ] ++ lib.optionals withMediaPlayback (with gst_all_1; [ 40 gst-plugins-base gst-plugins-good 41 gst-plugins-bad gst-plugins-ugly gst-libav 42 - ]) ++ lib.optional (!withWebEngineDefault) python3Packages.qtwebkit-plugins; 43 44 nativeBuildInputs = [ 45 makeWrapper wrapGAppsHook asciidoc ··· 88 for i in $scripts; do 89 patchPythonScript "$i" 90 done 91 - ''; 92 - 93 - postFixup = lib.optionalString (! withWebEngineDefault) '' 94 - wrapProgram $out/bin/qutebrowser --add-flags "--backend webkit" 95 ''; 96 97 meta = with stdenv.lib; {
··· 4 , libxslt, gst_all_1 ? null 5 , withPdfReader ? true 6 , withMediaPlayback ? true 7 }: 8 9 assert withMediaPlayback -> gst_all_1 != null; ··· 38 ] ++ lib.optionals withMediaPlayback (with gst_all_1; [ 39 gst-plugins-base gst-plugins-good 40 gst-plugins-bad gst-plugins-ugly gst-libav 41 + ]); 42 43 nativeBuildInputs = [ 44 makeWrapper wrapGAppsHook asciidoc ··· 87 for i in $scripts; do 88 patchPythonScript "$i" 89 done 90 ''; 91 92 meta = with stdenv.lib; {
+1 -1
pkgs/applications/networking/instant-messengers/blink/default.nix
··· 16 sed -i 's|@out@|'"''${out}"'|g' blink/resources.py 17 ''; 18 19 - propagatedBuildInputs = with pythonPackages; [ pyqt5 cjson sipsimple twisted google_api_python_client ]; 20 21 buildInputs = [ pythonPackages.cython zlib libvncserver libvpx ]; 22
··· 16 sed -i 's|@out@|'"''${out}"'|g' blink/resources.py 17 ''; 18 19 + propagatedBuildInputs = with pythonPackages; [ pyqt5_with_qtwebkit cjson sipsimple twisted google_api_python_client ]; 20 21 buildInputs = [ pythonPackages.cython zlib libvncserver libvpx ]; 22
+1 -1
pkgs/applications/networking/instant-messengers/scudcloud/default.nix
··· 9 sha256 = "e0d1cb72115d0fda17db92d28be51558ad8fe250972683fac3086dbe8d350d22"; 10 }; 11 12 - propagatedBuildInputs = with python3Packages; [ pyqt5 dbus-python jsmin ]; 13 14 meta = with stdenv.lib; { 15 description = "Non-official desktop client for Slack";
··· 9 sha256 = "e0d1cb72115d0fda17db92d28be51558ad8fe250972683fac3086dbe8d350d22"; 10 }; 11 12 + propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit dbus-python jsmin ]; 13 14 meta = with stdenv.lib; { 15 description = "Non-official desktop client for Slack";
+1
pkgs/applications/version-management/git-and-tools/git-cola/default.nix
··· 2 3 let 4 inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify; 5 in buildPythonApplication rec { 6 name = "git-cola-${version}"; 7 version = "3.2";
··· 2 3 let 4 inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify; 5 + 6 in buildPythonApplication rec { 7 name = "git-cola-${version}"; 8 version = "3.2";
+1 -1
pkgs/applications/video/openshot-qt/default.nix
··· 17 18 buildInputs = [ gtk3 ]; 19 20 - propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5 requests sip httplib2 pyzmq ]; 21 22 23 preConfigure = ''
··· 17 18 buildInputs = [ gtk3 ]; 19 20 + propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5_with_qtwebkit requests sip httplib2 pyzmq ]; 21 22 23 preConfigure = ''
+19 -22
pkgs/development/python-modules/pyqt/5.x.nix
··· 1 { lib, fetchurl, fetchpatch, pythonPackages, pkgconfig 2 - , qmake, lndir, qtbase, qtsvg, qtwebkit, qtwebengine, dbus 3 - , withWebSockets ? false, qtwebsockets 4 , withConnectivity ? false, qtconnectivity 5 }: 6 7 let 8 - pname = "PyQt"; 9 - version = "5.11.3"; 10 11 inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34; 12 13 sip = pythonPackages.sip.override { sip-module = "PyQt5.sip"; }; 14 15 - in buildPythonPackage { 16 - pname = pname; 17 - version = version; 18 format = "other"; 19 - 20 - meta = with lib; { 21 - description = "Python bindings for Qt5"; 22 - homepage = http://www.riverbankcomputing.co.uk; 23 - license = licenses.gpl3; 24 - platforms = platforms.mesaPlatforms; 25 - maintainers = with maintainers; [ sander ]; 26 - }; 27 28 src = fetchurl { 29 url = "mirror://sourceforge/pyqt/PyQt5/PyQt-${version}/PyQt5_gpl-${version}.tar.gz"; ··· 36 37 buildInputs = [ dbus sip ]; 38 39 - propagatedBuildInputs = [ 40 - qtbase qtsvg qtwebkit qtwebengine 41 - ] ++ lib.optional (!isPy3k) enum34 ++ lib.optional withWebSockets qtwebsockets ++ lib.optional withConnectivity qtconnectivity; 42 43 configurePhase = '' 44 runHook preConfigure ··· 48 rm -rf "$out/nix-support" 49 50 export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages} 51 - 52 - substituteInPlace configure.py \ 53 - --replace 'install_dir=pydbusmoddir' "install_dir='$out/${python.sitePackages}/dbus/mainloop'" \ 54 - --replace "ModuleMetadata(qmake_QT=['webkitwidgets'])" "ModuleMetadata(qmake_QT=['webkitwidgets', 'printsupport'])" 55 56 ${python.executable} configure.py -w \ 57 --confirm-license \ ··· 74 ''; 75 76 enableParallelBuilding = true; 77 }
··· 1 { lib, fetchurl, fetchpatch, pythonPackages, pkgconfig 2 + , qmake, lndir, qtbase, qtsvg, qtwebengine, dbus 3 , withConnectivity ? false, qtconnectivity 4 + , withWebKit ? false, qtwebkit 5 + , withWebSockets ? false, qtwebsockets 6 }: 7 8 let 9 10 inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34; 11 12 sip = pythonPackages.sip.override { sip-module = "PyQt5.sip"; }; 13 14 + in buildPythonPackage rec { 15 + pname = "PyQt"; 16 + version = "5.11.3"; 17 format = "other"; 18 19 src = fetchurl { 20 url = "mirror://sourceforge/pyqt/PyQt5/PyQt-${version}/PyQt5_gpl-${version}.tar.gz"; ··· 27 28 buildInputs = [ dbus sip ]; 29 30 + propagatedBuildInputs = [ qtbase qtsvg qtwebengine ] 31 + ++ lib.optional (!isPy3k) enum34 32 + ++ lib.optional withConnectivity qtconnectivity 33 + ++ lib.optional withWebKit qtwebkit 34 + ++ lib.optional withWebSockets qtwebsockets; 35 36 configurePhase = '' 37 runHook preConfigure ··· 41 rm -rf "$out/nix-support" 42 43 export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages} 44 45 ${python.executable} configure.py -w \ 46 --confirm-license \ ··· 63 ''; 64 65 enableParallelBuilding = true; 66 + 67 + meta = with lib; { 68 + description = "Python bindings for Qt5"; 69 + homepage = http://www.riverbankcomputing.co.uk; 70 + license = licenses.gpl3; 71 + platforms = platforms.mesaPlatforms; 72 + maintainers = with maintainers; [ sander ]; 73 + }; 74 }
+1 -1
pkgs/development/python-modules/qtconsole/default.nix
··· 31 description = "Jupyter Qt console"; 32 homepage = http://jupyter.org/; 33 license = lib.licenses.bsd3; 34 - platforms = lib.platforms.linux; # fails on Darwin 35 maintainers = with lib.maintainers; [ fridh ]; 36 }; 37 }
··· 31 description = "Jupyter Qt console"; 32 homepage = http://jupyter.org/; 33 license = lib.licenses.bsd3; 34 + platforms = lib.platforms.unix; 35 maintainers = with lib.maintainers; [ fridh ]; 36 }; 37 }
+4 -1
pkgs/misc/frescobaldi/default.nix
··· 11 sha256 = "1yn18pwsjxpxz5j3yfysmaif8k0vqahj5c7ays9cxsylpg9hl7jd"; 12 }; 13 14 - propagatedBuildInputs = with python3Packages; [ lilypond pygame python-ly poppler-qt5 ]; 15 16 # no tests in shipped with upstream 17 doCheck = false;
··· 11 sha256 = "1yn18pwsjxpxz5j3yfysmaif8k0vqahj5c7ays9cxsylpg9hl7jd"; 12 }; 13 14 + propagatedBuildInputs = with python3Packages; [ 15 + lilypond pygame python-ly sip 16 + pyqt5_with_qtwebkit (poppler-qt5.override { pyqt5 = pyqt5_with_qtwebkit; }) 17 + ]; 18 19 # no tests in shipped with upstream 20 doCheck = false;
+7
pkgs/top-level/python-packages.nix
··· 615 pythonPackages = self; 616 }; 617 618 pysc2 = callPackage ../development/python-modules/pysc2 { }; 619 620 pyscard = callPackage ../development/python-modules/pyscard { inherit (pkgs.darwin.apple_sdk.frameworks) PCSC; };
··· 615 pythonPackages = self; 616 }; 617 618 + /* 619 + `pyqt5_with_qtwebkit` should not be used by python libraries in 620 + pkgs/development/python-modules/*. Putting this attribute in 621 + `propagatedBuildInputs` may cause collisions. 622 + */ 623 + pyqt5_with_qtwebkit = self.pyqt5.override { withWebKit = true; }; 624 + 625 pysc2 = callPackage ../development/python-modules/pysc2 { }; 626 627 pyscard = callPackage ../development/python-modules/pyscard { inherit (pkgs.darwin.apple_sdk.frameworks) PCSC; };