Merge pull request #250171 from rnhmjoj/pr-qute

qutebrowser: 2.5.4 -> 3.0.0

authored by

Michele Guerini Rocco and committed by
GitHub
ad0bbaf1 032895db

+23 -53
+21 -51
pkgs/applications/networking/browsers/qutebrowser/default.nix
··· 1 - { stdenv, lib, fetchurl, fetchzip, fetchFromGitHub, python3 1 + { stdenv, lib, fetchurl, fetchzip, python3 2 2 , wrapQtAppsHook, glib-networking 3 3 , asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2 4 4 , libxslt, gst_all_1 ? null ··· 8 8 , pipewireSupport ? stdenv.isLinux 9 9 , pipewire 10 10 , qtwayland 11 - , mkDerivationWith ? null 12 - , qtbase ? null 13 - , qtwebengine ? null 14 - , wrapGAppsHook ? null 11 + , qtbase 12 + , qtwebengine 13 + , wrapGAppsHook 15 14 , enableWideVine ? false 16 15 , widevine-cdm 17 - }: let 18 - isQt6 = mkDerivationWith == null; 16 + }: 19 17 20 - python3Packages = python3.pkgs; 18 + let 21 19 pdfjs = let 22 20 version = "3.9.179"; 23 21 in ··· 27 25 stripRoot = false; 28 26 }; 29 27 30 - backendPackage = 31 - if backend == "webengine" then if isQt6 then python3Packages.pyqt6-webengine else python3Packages.pyqtwebengine else 32 - if backend == "webkit" then python3Packages.pyqt5_with_qtwebkit else 33 - throw '' 34 - Unknown qutebrowser backend "${backend}". 35 - Valid choices are qtwebengine (recommended) or qtwebkit. 36 - ''; 37 - 38 - buildPythonApplication = if isQt6 then python3Packages.buildPythonApplication else mkDerivationWith python3Packages.buildPythonApplication; 39 - 40 28 pname = "qutebrowser"; 41 - version = if isQt6 then "unstable-2023-04-18" else "2.5.4"; 29 + version = "3.0.0"; 42 30 in 43 31 44 32 assert withMediaPlayback -> gst_all_1 != null; 45 - assert isQt6 -> backend != "webkit"; 33 + assert lib.assertMsg (backend != "webkit") '' 34 + Support for the QtWebKit backend has been removed. 35 + Please remove the `backend = "webkit"` option from your qutebrowser override. 36 + ''; 46 37 47 - buildPythonApplication { 38 + python3.pkgs.buildPythonApplication { 48 39 inherit pname version; 49 - 50 - src = if isQt6 then 51 - # comes from the master branch of upstream 52 - # https://github.com/qutebrowser/qutebrowser/issues/7202 53 - # https://github.com/qutebrowser/qutebrowser/discussions/7628 54 - fetchFromGitHub { 55 - owner = "qutebrowser"; 56 - repo = "qutebrowser"; 57 - rev = "d4cafc0019a4a5574caa11966fc40ede89076d26"; 58 - hash = "sha256-Ma79EPvnwmQkeXEG9aSnD/Vt1DGhK2JX9dib7uARH8M="; 59 - } 60 - # the release tarballs are different from the git checkout! 61 - else fetchurl { 40 + src = fetchurl { 62 41 url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${pname}-${version}.tar.gz"; 63 - hash = "sha256-pGCyICUn5CpnDCbSJdn6ZBfQkswfFvOpXnvJXdicGrE="; 42 + hash = "sha256-Oer0p/DwUfOejUCgSCSkMvLLAjNyJx51qgN7bcQQ2Pw="; 64 43 }; 65 44 66 45 # Needs tox ··· 77 56 nativeBuildInputs = [ 78 57 wrapQtAppsHook wrapGAppsHook asciidoc 79 58 docbook_xml_dtd_45 docbook_xsl libxml2 libxslt 80 - ] 81 - ++ lib.optional isQt6 python3Packages.pygments; 59 + python3.pkgs.pygments 60 + ]; 82 61 83 - propagatedBuildInputs = with python3Packages; ([ 84 - pyyaml backendPackage jinja2 pygments 62 + propagatedBuildInputs = with python3.pkgs; ([ 63 + pyyaml pyqtwebengine jinja2 pygments 85 64 # scripts and userscripts libs 86 65 tldextract beautifulsoup4 87 66 readability-lxml pykeepass stem 88 67 pynacl 89 68 # extensive ad blocking 90 69 adblock 91 - ] 92 - ++ lib.optional (pythonOlder "3.9") importlib-resources 93 - ++ lib.optional stdenv.isLinux qtwayland 70 + ] ++ lib.optional stdenv.isLinux qtwayland 94 71 ); 95 72 96 73 patches = [ ··· 99 76 100 77 dontWrapGApps = true; 101 78 dontWrapQtApps = true; 102 - 103 - preConfigure = lib.optionalString isQt6 '' 104 - python scripts/asciidoc2html.py 105 - ''; 106 79 107 80 postPatch = '' 108 81 substituteInPlace qutebrowser/misc/quitter.py --subst-var-by qutebrowser "$out/bin/qutebrowser" ··· 141 114 makeWrapperArgs+=( 142 115 "''${gappsWrapperArgs[@]}" 143 116 "''${qtWrapperArgs[@]}" 144 - --add-flags '--backend ${backend}' 145 - --set QUTE_QTWEBENGINE_VERSION_OVERRIDE "${lib.getVersion qtwebengine}" 146 - ${lib.optionalString isQt6 ''--set QUTE_QT_WRAPPER "PyQt6"''} 147 - ${lib.optionalString (pipewireSupport && backend == "webengine") ''--prefix LD_LIBRARY_PATH : ${libPath}''} 117 + ${lib.optionalString pipewireSupport ''--prefix LD_LIBRARY_PATH : ${libPath}''} 148 118 ${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"''} 149 119 ) 150 120 ''; ··· 153 123 homepage = "https://github.com/qutebrowser/qutebrowser"; 154 124 description = "Keyboard-focused browser with a minimal GUI"; 155 125 license = licenses.gpl3Plus; 156 - platforms = if enableWideVine then [ "x86_64-linux" ] else backendPackage.meta.platforms; 126 + platforms = if enableWideVine then [ "x86_64-linux" ] else qtwebengine.meta.platforms; 157 127 maintainers = with maintainers; [ jagajaga rnhmjoj ebzzry dotlambda nrdxp ]; 158 128 }; 159 129 }
+1
pkgs/top-level/aliases.nix
··· 1488 1488 quake3game = throw "'quake3game' has been renamed to/replaced by 'ioquake3'"; # Converted to throw 2022-02-22 1489 1489 quaternion-git = throw "quaternion-git has been removed in favor of the stable version 'quaternion'"; # Added 2020-04-09 1490 1490 quilter = throw "quilter has been removed from nixpkgs, as it was unmaintained"; # Added 2021-08-03 1491 + qutebrowser-qt6 = throw "'qutebrowser-qt6' has been replaced by 'qutebrowser', since the the qt5 version has been removed"; # Added 2023-08-19 1491 1492 qvim = throw "qvim has been removed"; # Added 2020-08-31 1492 1493 qweechat = throw "qweechat has been removed because it was broken"; # Added 2021-03-08 1493 1494 qwt6 = throw "'qwt6' has been renamed to/replaced by 'libsForQt5.qwt'"; # Converted to throw 2022-02-22
+1 -2
pkgs/top-level/all-packages.nix
··· 34909 34909 withXineBackend = true; 34910 34910 }; 34911 34911 34912 - qutebrowser = libsForQt5.callPackage ../applications/networking/browsers/qutebrowser { }; 34913 - qutebrowser-qt6 = callPackage ../applications/networking/browsers/qutebrowser { 34912 + qutebrowser = callPackage ../applications/networking/browsers/qutebrowser { 34914 34913 inherit (qt6Packages) qtbase qtwebengine wrapQtAppsHook qtwayland; 34915 34914 }; 34916 34915