mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
Merge pull request #51846 from veprbl/pr/pyqt5_opt_qtwebkit
pyqt5: make qtwebkit optional, disable by default
This commit is contained in:
commit
26e5c0f07a
@ -25,7 +25,7 @@
|
|||||||
DESTDIR=$(out)
|
DESTDIR=$(out)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyqt5 ];
|
propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise
|
# replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise
|
||||||
|
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||||||
] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
|
] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5}/share/sip/PyQt5':" \
|
sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5_with_qtwebkit}/share/sip/PyQt5':" \
|
||||||
setup/build_environment.py
|
setup/build_environment.py
|
||||||
|
|
||||||
# Remove unneeded files and libs
|
# Remove unneeded files and libs
|
||||||
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
|
|||||||
fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
|
fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
|
||||||
] ++ (with python2Packages; [
|
] ++ (with python2Packages; [
|
||||||
apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow
|
apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow
|
||||||
python pyqt5 sip
|
python pyqt5_with_qtwebkit sip
|
||||||
regex msgpack
|
regex msgpack
|
||||||
# the following are distributed with calibre, but we use upstream instead
|
# the following are distributed with calibre, but we use upstream instead
|
||||||
odfpy
|
odfpy
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
, libxslt, gst_all_1 ? null
|
, libxslt, gst_all_1 ? null
|
||||||
, withPdfReader ? true
|
, withPdfReader ? true
|
||||||
, withMediaPlayback ? true
|
, withMediaPlayback ? true
|
||||||
, withWebEngineDefault ? true
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert withMediaPlayback -> gst_all_1 != null;
|
assert withMediaPlayback -> gst_all_1 != null;
|
||||||
@ -39,7 +38,7 @@ in python3Packages.buildPythonApplication rec {
|
|||||||
] ++ lib.optionals withMediaPlayback (with gst_all_1; [
|
] ++ lib.optionals withMediaPlayback (with gst_all_1; [
|
||||||
gst-plugins-base gst-plugins-good
|
gst-plugins-base gst-plugins-good
|
||||||
gst-plugins-bad gst-plugins-ugly gst-libav
|
gst-plugins-bad gst-plugins-ugly gst-libav
|
||||||
]) ++ lib.optional (!withWebEngineDefault) python3Packages.qtwebkit-plugins;
|
]);
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeWrapper wrapGAppsHook asciidoc
|
makeWrapper wrapGAppsHook asciidoc
|
||||||
@ -90,10 +89,6 @@ in python3Packages.buildPythonApplication rec {
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = lib.optionalString (! withWebEngineDefault) ''
|
|
||||||
wrapProgram $out/bin/qutebrowser --add-flags "--backend webkit"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://github.com/The-Compiler/qutebrowser;
|
homepage = https://github.com/The-Compiler/qutebrowser;
|
||||||
description = "Keyboard-focused browser with a minimal GUI";
|
description = "Keyboard-focused browser with a minimal GUI";
|
||||||
|
@ -16,7 +16,7 @@ pythonPackages.buildPythonApplication rec {
|
|||||||
sed -i 's|@out@|'"''${out}"'|g' blink/resources.py
|
sed -i 's|@out@|'"''${out}"'|g' blink/resources.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = with pythonPackages; [ pyqt5 cjson sipsimple twisted google_api_python_client ];
|
propagatedBuildInputs = with pythonPackages; [ pyqt5_with_qtwebkit cjson sipsimple twisted google_api_python_client ];
|
||||||
|
|
||||||
buildInputs = [ pythonPackages.cython zlib libvncserver libvpx ];
|
buildInputs = [ pythonPackages.cython zlib libvncserver libvpx ];
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ in python3Packages.buildPythonPackage {
|
|||||||
sha256 = "e0d1cb72115d0fda17db92d28be51558ad8fe250972683fac3086dbe8d350d22";
|
sha256 = "e0d1cb72115d0fda17db92d28be51558ad8fe250972683fac3086dbe8d350d22";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyqt5 dbus-python jsmin ];
|
propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit dbus-python jsmin ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Non-official desktop client for Slack";
|
description = "Non-official desktop client for Slack";
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify;
|
inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify;
|
||||||
|
|
||||||
in buildPythonApplication rec {
|
in buildPythonApplication rec {
|
||||||
name = "git-cola-${version}";
|
name = "git-cola-${version}";
|
||||||
version = "3.2";
|
version = "3.2";
|
||||||
|
@ -17,7 +17,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
|
|
||||||
buildInputs = [ gtk3 ];
|
buildInputs = [ gtk3 ];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5 requests sip httplib2 pyzmq ];
|
propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5_with_qtwebkit requests sip httplib2 pyzmq ];
|
||||||
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
@ -1,30 +1,21 @@
|
|||||||
{ lib, fetchurl, fetchpatch, pythonPackages, pkgconfig
|
{ lib, fetchurl, fetchpatch, pythonPackages, pkgconfig
|
||||||
, qmake, lndir, qtbase, qtsvg, qtwebkit, qtwebengine, dbus
|
, qmake, lndir, qtbase, qtsvg, qtwebengine, dbus
|
||||||
, withWebSockets ? false, qtwebsockets
|
|
||||||
, withConnectivity ? false, qtconnectivity
|
, withConnectivity ? false, qtconnectivity
|
||||||
|
, withWebKit ? false, qtwebkit
|
||||||
|
, withWebSockets ? false, qtwebsockets
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "PyQt";
|
|
||||||
version = "5.11.3";
|
|
||||||
|
|
||||||
inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34;
|
inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34;
|
||||||
|
|
||||||
sip = pythonPackages.sip.override { sip-module = "PyQt5.sip"; };
|
sip = pythonPackages.sip.override { sip-module = "PyQt5.sip"; };
|
||||||
|
|
||||||
in buildPythonPackage {
|
in buildPythonPackage rec {
|
||||||
pname = pname;
|
pname = "PyQt";
|
||||||
version = version;
|
version = "5.11.3";
|
||||||
format = "other";
|
format = "other";
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Python bindings for Qt5";
|
|
||||||
homepage = http://www.riverbankcomputing.co.uk;
|
|
||||||
license = licenses.gpl3;
|
|
||||||
platforms = platforms.mesaPlatforms;
|
|
||||||
maintainers = with maintainers; [ sander ];
|
|
||||||
};
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/pyqt/PyQt5/PyQt-${version}/PyQt5_gpl-${version}.tar.gz";
|
url = "mirror://sourceforge/pyqt/PyQt5/PyQt-${version}/PyQt5_gpl-${version}.tar.gz";
|
||||||
sha256 = "0wqh4srqkcc03rvkwrcshaa028psrq58xkys6npnyhqxc0apvdf9";
|
sha256 = "0wqh4srqkcc03rvkwrcshaa028psrq58xkys6npnyhqxc0apvdf9";
|
||||||
@ -36,9 +27,11 @@ in buildPythonPackage {
|
|||||||
|
|
||||||
buildInputs = [ dbus sip ];
|
buildInputs = [ dbus sip ];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [ qtbase qtsvg qtwebengine ]
|
||||||
qtbase qtsvg qtwebkit qtwebengine
|
++ lib.optional (!isPy3k) enum34
|
||||||
] ++ lib.optional (!isPy3k) enum34 ++ lib.optional withWebSockets qtwebsockets ++ lib.optional withConnectivity qtconnectivity;
|
++ lib.optional withConnectivity qtconnectivity
|
||||||
|
++ lib.optional withWebKit qtwebkit
|
||||||
|
++ lib.optional withWebSockets qtwebsockets;
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
runHook preConfigure
|
runHook preConfigure
|
||||||
@ -49,10 +42,6 @@ in buildPythonPackage {
|
|||||||
|
|
||||||
export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages}
|
export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages}
|
||||||
|
|
||||||
substituteInPlace configure.py \
|
|
||||||
--replace 'install_dir=pydbusmoddir' "install_dir='$out/${python.sitePackages}/dbus/mainloop'" \
|
|
||||||
--replace "ModuleMetadata(qmake_QT=['webkitwidgets'])" "ModuleMetadata(qmake_QT=['webkitwidgets', 'printsupport'])"
|
|
||||||
|
|
||||||
${python.executable} configure.py -w \
|
${python.executable} configure.py -w \
|
||||||
--confirm-license \
|
--confirm-license \
|
||||||
--dbus=${dbus.dev}/include/dbus-1.0 \
|
--dbus=${dbus.dev}/include/dbus-1.0 \
|
||||||
@ -74,4 +63,12 @@ in buildPythonPackage {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python bindings for Qt5";
|
||||||
|
homepage = http://www.riverbankcomputing.co.uk;
|
||||||
|
license = licenses.gpl3;
|
||||||
|
platforms = platforms.mesaPlatforms;
|
||||||
|
maintainers = with maintainers; [ sander ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ buildPythonPackage rec {
|
|||||||
description = "Jupyter Qt console";
|
description = "Jupyter Qt console";
|
||||||
homepage = http://jupyter.org/;
|
homepage = http://jupyter.org/;
|
||||||
license = lib.licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
platforms = lib.platforms.linux; # fails on Darwin
|
platforms = lib.platforms.unix;
|
||||||
maintainers = with lib.maintainers; [ fridh ];
|
maintainers = with lib.maintainers; [ fridh ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,10 @@ python3Packages.buildPythonApplication rec {
|
|||||||
sha256 = "1yn18pwsjxpxz5j3yfysmaif8k0vqahj5c7ays9cxsylpg9hl7jd";
|
sha256 = "1yn18pwsjxpxz5j3yfysmaif8k0vqahj5c7ays9cxsylpg9hl7jd";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ lilypond pygame python-ly poppler-qt5 ];
|
propagatedBuildInputs = with python3Packages; [
|
||||||
|
lilypond pygame python-ly sip
|
||||||
|
pyqt5_with_qtwebkit (poppler-qt5.override { pyqt5 = pyqt5_with_qtwebkit; })
|
||||||
|
];
|
||||||
|
|
||||||
# no tests in shipped with upstream
|
# no tests in shipped with upstream
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
@ -615,6 +615,13 @@ in {
|
|||||||
pythonPackages = self;
|
pythonPackages = self;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
`pyqt5_with_qtwebkit` should not be used by python libraries in
|
||||||
|
pkgs/development/python-modules/*. Putting this attribute in
|
||||||
|
`propagatedBuildInputs` may cause collisions.
|
||||||
|
*/
|
||||||
|
pyqt5_with_qtwebkit = self.pyqt5.override { withWebKit = true; };
|
||||||
|
|
||||||
pysc2 = callPackage ../development/python-modules/pysc2 { };
|
pysc2 = callPackage ../development/python-modules/pysc2 { };
|
||||||
|
|
||||||
pyscard = callPackage ../development/python-modules/pyscard { inherit (pkgs.darwin.apple_sdk.frameworks) PCSC; };
|
pyscard = callPackage ../development/python-modules/pyscard { inherit (pkgs.darwin.apple_sdk.frameworks) PCSC; };
|
||||||
|
Loading…
Reference in New Issue
Block a user