mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
Merge pull request #93336 from rnhmjoj/qute-backend
qutebrowser: re-add option to control the browser backend
This commit is contained in:
commit
7f9a64cfdf
@ -2,8 +2,9 @@
|
|||||||
, mkDerivationWith, wrapQtAppsHook, wrapGAppsHook, qtbase, glib-networking
|
, mkDerivationWith, wrapQtAppsHook, wrapGAppsHook, qtbase, glib-networking
|
||||||
, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2
|
, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2
|
||||||
, libxslt, gst_all_1 ? null
|
, libxslt, gst_all_1 ? null
|
||||||
, withPdfReader ? true
|
, withPdfReader ? true
|
||||||
, withMediaPlayback ? true
|
, withMediaPlayback ? true
|
||||||
|
, backend ? "webkit"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert withMediaPlayback -> gst_all_1 != null;
|
assert withMediaPlayback -> gst_all_1 != null;
|
||||||
@ -19,6 +20,14 @@ let
|
|||||||
stripRoot = false;
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
backendPackage =
|
||||||
|
if backend == "webengine" then python3Packages.pyqtwebengine else
|
||||||
|
if backend == "webkit" then python3Packages.pyqt5_with_qtwebkit else
|
||||||
|
throw ''
|
||||||
|
Unknown qutebrowser backend "${backend}".
|
||||||
|
Valid choices are qtwebengine (recommended) or qtwebkit.
|
||||||
|
'';
|
||||||
|
|
||||||
in mkDerivationWith python3Packages.buildPythonApplication rec {
|
in mkDerivationWith python3Packages.buildPythonApplication rec {
|
||||||
pname = "qutebrowser";
|
pname = "qutebrowser";
|
||||||
version = "1.13.0";
|
version = "1.13.0";
|
||||||
@ -46,16 +55,14 @@ in mkDerivationWith python3Packages.buildPythonApplication rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
pyyaml pyqt5 pyqtwebengine jinja2 pygments
|
pyyaml backendPackage jinja2 pygments
|
||||||
pypeg2 cssutils pyopengl attrs setuptools
|
pypeg2 cssutils pyopengl attrs setuptools
|
||||||
# scripts and userscripts libs
|
# scripts and userscripts libs
|
||||||
tldextract beautifulsoup4
|
tldextract beautifulsoup4
|
||||||
pyreadability pykeepass stem
|
pyreadability pykeepass stem
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
patches = [ ./fix-restart.patch ];
|
||||||
./fix-restart.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
@ -101,7 +108,8 @@ in mkDerivationWith python3Packages.buildPythonApplication rec {
|
|||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapProgram $out/bin/qutebrowser \
|
wrapProgram $out/bin/qutebrowser \
|
||||||
"''${gappsWrapperArgs[@]}" \
|
"''${gappsWrapperArgs[@]}" \
|
||||||
"''${qtWrapperArgs[@]}"
|
"''${qtWrapperArgs[@]}" \
|
||||||
|
--add-flags '--backend ${backend}'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user