Revert "Revert "qutebrowser: 2.5.4 -> 3.0.0""
This commit is contained in:
parent
a6f3b53fd5
commit
f1ca6257dc
3 changed files with 22 additions and 52 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, lib, fetchurl, fetchzip, fetchFromGitHub, python3
|
{ stdenv, lib, fetchurl, fetchzip, python3
|
||||||
, wrapQtAppsHook, glib-networking
|
, wrapQtAppsHook, 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
|
||||||
|
@ -8,16 +8,14 @@
|
||||||
, pipewireSupport ? stdenv.isLinux
|
, pipewireSupport ? stdenv.isLinux
|
||||||
, pipewire
|
, pipewire
|
||||||
, qtwayland
|
, qtwayland
|
||||||
, mkDerivationWith ? null
|
, qtbase
|
||||||
, qtbase ? null
|
, qtwebengine
|
||||||
, qtwebengine ? null
|
, wrapGAppsHook
|
||||||
, wrapGAppsHook ? null
|
|
||||||
, enableWideVine ? false
|
, enableWideVine ? false
|
||||||
, widevine-cdm
|
, widevine-cdm
|
||||||
}: let
|
}:
|
||||||
isQt6 = mkDerivationWith == null;
|
|
||||||
|
|
||||||
python3Packages = python3.pkgs;
|
let
|
||||||
pdfjs = let
|
pdfjs = let
|
||||||
version = "3.9.179";
|
version = "3.9.179";
|
||||||
in
|
in
|
||||||
|
@ -27,40 +25,21 @@
|
||||||
stripRoot = false;
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
backendPackage =
|
|
||||||
if backend == "webengine" then if isQt6 then python3Packages.pyqt6-webengine else python3Packages.pyqtwebengine else
|
|
||||||
if backend == "webkit" then python3Packages.pyqt5_with_qtwebkit else
|
|
||||||
throw ''
|
|
||||||
Unknown qutebrowser backend "${backend}".
|
|
||||||
Valid choices are qtwebengine (recommended) or qtwebkit.
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPythonApplication = if isQt6 then python3Packages.buildPythonApplication else mkDerivationWith python3Packages.buildPythonApplication;
|
|
||||||
|
|
||||||
pname = "qutebrowser";
|
pname = "qutebrowser";
|
||||||
version = if isQt6 then "unstable-2023-04-18" else "2.5.4";
|
version = "3.0.0";
|
||||||
in
|
in
|
||||||
|
|
||||||
assert withMediaPlayback -> gst_all_1 != null;
|
assert withMediaPlayback -> gst_all_1 != null;
|
||||||
assert isQt6 -> backend != "webkit";
|
assert lib.assertMsg (backend != "webkit") ''
|
||||||
|
Support for the QtWebKit backend has been removed.
|
||||||
|
Please remove the `backend = "webkit"` option from your qutebrowser override.
|
||||||
|
'';
|
||||||
|
|
||||||
buildPythonApplication {
|
python3.pkgs.buildPythonApplication {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
src = fetchurl {
|
||||||
src = if isQt6 then
|
|
||||||
# comes from the master branch of upstream
|
|
||||||
# https://github.com/qutebrowser/qutebrowser/issues/7202
|
|
||||||
# https://github.com/qutebrowser/qutebrowser/discussions/7628
|
|
||||||
fetchFromGitHub {
|
|
||||||
owner = "qutebrowser";
|
|
||||||
repo = "qutebrowser";
|
|
||||||
rev = "d4cafc0019a4a5574caa11966fc40ede89076d26";
|
|
||||||
hash = "sha256-Ma79EPvnwmQkeXEG9aSnD/Vt1DGhK2JX9dib7uARH8M=";
|
|
||||||
}
|
|
||||||
# the release tarballs are different from the git checkout!
|
|
||||||
else fetchurl {
|
|
||||||
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${pname}-${version}.tar.gz";
|
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${pname}-${version}.tar.gz";
|
||||||
hash = "sha256-pGCyICUn5CpnDCbSJdn6ZBfQkswfFvOpXnvJXdicGrE=";
|
hash = "sha256-Oer0p/DwUfOejUCgSCSkMvLLAjNyJx51qgN7bcQQ2Pw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Needs tox
|
# Needs tox
|
||||||
|
@ -77,20 +56,18 @@ buildPythonApplication {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
wrapQtAppsHook wrapGAppsHook asciidoc
|
wrapQtAppsHook wrapGAppsHook asciidoc
|
||||||
docbook_xml_dtd_45 docbook_xsl libxml2 libxslt
|
docbook_xml_dtd_45 docbook_xsl libxml2 libxslt
|
||||||
]
|
python3.pkgs.pygments
|
||||||
++ lib.optional isQt6 python3Packages.pygments;
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3.pkgs; ([
|
propagatedBuildInputs = with python3.pkgs; ([
|
||||||
pyyaml backendPackage jinja2 pygments
|
pyyaml pyqt6-webengine jinja2 pygments
|
||||||
# scripts and userscripts libs
|
# scripts and userscripts libs
|
||||||
tldextract beautifulsoup4
|
tldextract beautifulsoup4
|
||||||
readability-lxml pykeepass stem
|
readability-lxml pykeepass stem
|
||||||
pynacl
|
pynacl
|
||||||
# extensive ad blocking
|
# extensive ad blocking
|
||||||
adblock
|
adblock
|
||||||
]
|
] ++ lib.optional stdenv.isLinux qtwayland
|
||||||
++ lib.optional (pythonOlder "3.9") importlib-resources
|
|
||||||
++ lib.optional stdenv.isLinux qtwayland
|
|
||||||
);
|
);
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -100,10 +77,6 @@ buildPythonApplication {
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
preConfigure = lib.optionalString isQt6 ''
|
|
||||||
python scripts/asciidoc2html.py
|
|
||||||
'';
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace qutebrowser/misc/quitter.py --subst-var-by qutebrowser "$out/bin/qutebrowser"
|
substituteInPlace qutebrowser/misc/quitter.py --subst-var-by qutebrowser "$out/bin/qutebrowser"
|
||||||
|
|
||||||
|
@ -141,10 +114,7 @@ buildPythonApplication {
|
||||||
makeWrapperArgs+=(
|
makeWrapperArgs+=(
|
||||||
"''${gappsWrapperArgs[@]}"
|
"''${gappsWrapperArgs[@]}"
|
||||||
"''${qtWrapperArgs[@]}"
|
"''${qtWrapperArgs[@]}"
|
||||||
--add-flags '--backend ${backend}'
|
${lib.optionalString pipewireSupport ''--prefix LD_LIBRARY_PATH : ${libPath}''}
|
||||||
--set QUTE_QTWEBENGINE_VERSION_OVERRIDE "${lib.getVersion qtwebengine}"
|
|
||||||
${lib.optionalString isQt6 ''--set QUTE_QT_WRAPPER "PyQt6"''}
|
|
||||||
${lib.optionalString (pipewireSupport && backend == "webengine") ''--prefix LD_LIBRARY_PATH : ${libPath}''}
|
|
||||||
${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"''}
|
${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"''}
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
@ -153,7 +123,7 @@ buildPythonApplication {
|
||||||
homepage = "https://github.com/qutebrowser/qutebrowser";
|
homepage = "https://github.com/qutebrowser/qutebrowser";
|
||||||
description = "Keyboard-focused browser with a minimal GUI";
|
description = "Keyboard-focused browser with a minimal GUI";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = if enableWideVine then [ "x86_64-linux" ] else backendPackage.meta.platforms;
|
platforms = if enableWideVine then [ "x86_64-linux" ] else qtwebengine.meta.platforms;
|
||||||
maintainers = with maintainers; [ jagajaga rnhmjoj ebzzry dotlambda nrdxp ];
|
maintainers = with maintainers; [ jagajaga rnhmjoj ebzzry dotlambda nrdxp ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1492,6 +1492,7 @@ mapAliases ({
|
||||||
quake3game = throw "'quake3game' has been renamed to/replaced by 'ioquake3'"; # Converted to throw 2022-02-22
|
quake3game = throw "'quake3game' has been renamed to/replaced by 'ioquake3'"; # Converted to throw 2022-02-22
|
||||||
quaternion-git = throw "quaternion-git has been removed in favor of the stable version 'quaternion'"; # Added 2020-04-09
|
quaternion-git = throw "quaternion-git has been removed in favor of the stable version 'quaternion'"; # Added 2020-04-09
|
||||||
quilter = throw "quilter has been removed from nixpkgs, as it was unmaintained"; # Added 2021-08-03
|
quilter = throw "quilter has been removed from nixpkgs, as it was unmaintained"; # Added 2021-08-03
|
||||||
|
qutebrowser-qt6 = throw "'qutebrowser-qt6' has been replaced by 'qutebrowser', since the the qt5 version has been removed"; # Added 2023-08-19
|
||||||
qvim = throw "qvim has been removed"; # Added 2020-08-31
|
qvim = throw "qvim has been removed"; # Added 2020-08-31
|
||||||
qweechat = throw "qweechat has been removed because it was broken"; # Added 2021-03-08
|
qweechat = throw "qweechat has been removed because it was broken"; # Added 2021-03-08
|
||||||
qwt6 = throw "'qwt6' has been renamed to/replaced by 'libsForQt5.qwt'"; # Converted to throw 2022-02-22
|
qwt6 = throw "'qwt6' has been renamed to/replaced by 'libsForQt5.qwt'"; # Converted to throw 2022-02-22
|
||||||
|
|
|
@ -35109,8 +35109,7 @@ with pkgs;
|
||||||
withXineBackend = true;
|
withXineBackend = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
qutebrowser = libsForQt5.callPackage ../applications/networking/browsers/qutebrowser { };
|
qutebrowser = callPackage ../applications/networking/browsers/qutebrowser {
|
||||||
qutebrowser-qt6 = callPackage ../applications/networking/browsers/qutebrowser {
|
|
||||||
inherit (qt6Packages) qtbase qtwebengine wrapQtAppsHook qtwayland;
|
inherit (qt6Packages) qtbase qtwebengine wrapQtAppsHook qtwayland;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue