Thank you Marius for this patch. I've tried it and it seems to be mostly working. I've tried updating PyQt to include webengine: also seems to be working.
Finally, I've tried updating Qutebrowser to 1.6.1 with Webengine support. I went quite far, but unfortunately on startup it shows: --8<---------------cut here---------------start------------->8--- > /gnu/store/m94dlnqcln96v02x0z2hxsr50gsmn0g7-qutebrowser-1.6.1/bin/qutebrowser 15:50:10 INFO: Run :adblock-update to get adblock lists. 15:50:10 CRITICAL: Could not find QtWebEngineProcess aborted --8<---------------cut here---------------end--------------->8--- I tried adding pyqt5/libexec to the PATH (in which QtWebEngineProcess resides), to no avail. Find my patches attach (it includes Marius patch). -- Pierre Neidhardt https://ambrevar.xyz/
signature.asc
Description: PGP signature
>From 6f6de59db1019fcae90bdd482a751711abd72596 Mon Sep 17 00:00:00 2001 From: Marius Bakke <mba...@fastmail.com> Date: Sun, 19 Aug 2018 18:36:55 +0200 Subject: [PATCH 1/3] gnu: Add qtwebengine. * gnu/packages/qt.scm (qtwebengine): New public variable. --- gnu/packages/qt.scm | 95 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 5b463f510f..588a0cf00d 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018 Nicolas Goaziou <m...@nicolasgoaziou.fr> ;;; Copyright © 2018 Hartmut Goebel <h.goe...@crazy-compilers.com> ;;; Copyright © 2018 Eric Bavier <bav...@member.fsf.org> +;;; Copyright © 2019 Marius Bakke <mba...@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,7 @@ #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages bison) + #:use-module (gnu packages build-tools) #:use-module (gnu packages compression) #:use-module (gnu packages cups) #:use-module (gnu packages databases) @@ -46,6 +48,7 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages flex) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnuzilla) @@ -54,21 +57,29 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) + #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages maths) + #:use-module (gnu packages ninja) #:use-module (gnu packages pciutils) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages protobuf) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages regex) #:use-module (gnu packages ruby) #:use-module (gnu packages sdl) + #:use-module (gnu packages serialization) #:use-module (gnu packages sqlite) + #:use-module (gnu packages telephony) #:use-module (gnu packages tls) + #:use-module (gnu packages video) #:use-module (gnu packages vulkan) #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) #:use-module (gnu packages xml) #:use-module (srfi srfi-1)) @@ -965,6 +976,90 @@ with JavaScript and C++."))) (description "The Qt Connectivity modules provides modules for interacting with Bluetooth and NFC."))) +(define-public qtwebengine + (package (inherit qtsvg) + (name "qtwebengine") + (version "5.11.3") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases/qt/" + (version-major+minor version) "/" version + "/submodules/" name "-everywhere-src-" + version ".tar.xz")) + (sha256 + (base32 + "1zmqsdais85cdfh2jh8h4a5jcamp1mzdk3vgqm6xnldqf6nrxd2v")))) + (arguments + (substitute-keyword-arguments (package-arguments qtsvg) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'delete-unneeded-stuff + ;; FIXME: Move to source snippet. + (lambda _ + (delete-file-recursively "src/3rdparty/ninja") + #t)) + (add-before 'configure 'set-CC + (lambda _ + (setenv "CC" "gcc") + #t)) + (replace 'configure + (lambda _ + (invoke "qmake" "--" + "-alsa" + "-ffmpeg" + "-pulseaudio" + "-webp" + "-webengine-icu"))))))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex) + ("gn" ,gn) + ("gperf" ,gperf) + ("ninja" ,ninja) + ("perl" ,perl) + ("pkg-config" ,pkg-config))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("dbus" ,dbus) + ("glib" ,glib) + ("ffmpeg" ,ffmpeg) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("harfbuzz" ,harfbuzz) + ("icu" ,icu4c) + ("jsoncpp" ,jsoncpp) + ("lcms" ,lcms) + ("libdrm" ,libdrm) + ("libevent" ,libevent) + ("libjpeg" ,libjpeg-turbo) + ("libpng" ,libpng) + ("libsrtp" ,libsrtp) + ("libvpx" ,libvpx-1.7) + ("libwebp" ,libwebp) + ("libxcomposite" ,libxcomposite) + ("libxcursor" ,libxcursor) + ("libxi" ,libxi) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("libxrandr" ,libxrandr) + ("libxtst" ,libxtst) + ("minizip" ,minizip) + ("nss" ,nss) + ("opus" ,opus) + ("protobuf" ,protobuf) + ("pulseaudion" ,pulseaudio) + ("python2" ,python-2) + ("qtbase" ,qtbase) + ("qtdeclarative" ,qtdeclarative) + ("qtwebchannel" ,qtwebchannel) + ("re2" ,re2) + ("snappy" ,snappy) + ("zlib" ,zlib))) + (synopsis "Qt Web Engine") + (description + "Qt WebEngine provides functionality for rendering regions of dynamic +web content."))) + (define-public qtwebsockets (package (inherit qtsvg) (name "qtwebsockets") -- 2.21.0
>From c1d601185c2d2e676eee61288ef0e5673e9dcf8c Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt <m...@ambrevar.xyz> Date: Thu, 28 Mar 2019 15:53:36 +0100 Subject: [PATCH 2/3] gnu: python-pyqt: Include pyqtwebengine. * gnu/packages/qt.scm (python-pyqt)[inputs]: Add qtwebengine. --- gnu/packages/qt.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 588a0cf00d..247a5abda3 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -1910,6 +1910,7 @@ module provides support functions to the automatically generated code.") ("qttools" ,qttools) ("qtwebchannel" ,qtwebchannel) ("qtwebkit" ,qtwebkit) + ("qtwebengine" ,qtwebengine) ("qtwebsockets" ,qtwebsockets) ("qtx11extras" ,qtx11extras) ("qtxmlpatterns" ,qtxmlpatterns))) -- 2.21.0
>From 2be0c86164bae9a3655c7b2322fca1f623abc18f Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt <m...@ambrevar.xyz> Date: Thu, 28 Mar 2019 15:54:47 +0100 Subject: [PATCH 3/3] gnu: qutebrowser: Update to 1.6.1. * gnu/packages/web-browsers.scm (qutebrowser): Update to 1.6.1. [inputs]: Remove python-colorama, add python-attrs, qtwebengine. [arguments]: Use included Makefile to install. --- gnu/packages/web-browsers.scm | 61 ++++++++++++++++------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index b6af572778..e891674412 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -270,21 +270,22 @@ access.") (define-public qutebrowser (package (name "qutebrowser") - (version "0.11.0") + (version "1.6.1") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/The-Compiler/" - "qutebrowser/releases/download/v" version "/" - "qutebrowser-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/qutebrowser/qutebrowser") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "13ihx66jm1dd6vx8px7pm0kbzf2sf9x43hhivc1rp17kahnxxdyv")))) + "1y2z2g9fp7gamm0ak1k48m134bl9b123ikkyq67wfgw4rglzfckm")))) (build-system python-build-system) (native-inputs `(("asciidoc" ,asciidoc))) (inputs - `(("python-colorama" ,python-colorama) + `(("python-attrs" ,python-attrs) ("python-cssutils" ,python-cssutils) ("python-jinja2" ,python-jinja2) ("python-markupsafe" ,python-markupsafe) @@ -292,40 +293,34 @@ access.") ("python-pypeg2" ,python-pypeg2) ("python-pyyaml" ,python-pyyaml) ("python-pyqt" ,python-pyqt) - ("qtwebkit" ,qtwebkit))) + ("qtwebkit" ,qtwebkit) ; TODO: Remove? Will be deprecated soon. + ("qtwebengine" ,qtwebengine) + ("sqlite" ,sqlite-with-column-metadata))) (arguments - `(#:tests? #f ;no tests + `(#:tests? #f ; TODO: Fix error "Permission denied: 'qutebrowser/resources.py'" #:phases (modify-phases %standard-phases (add-after 'install 'install-more (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (app (string-append out "/share/applications")) - (hicolor (string-append out "/share/icons/hicolor"))) - (invoke "a2x" "-f" "manpage" "doc/qutebrowser.1.asciidoc") - (install-file "doc/qutebrowser.1" - (string-append out "/share/man/man1")) - - (for-each - (lambda (i) - (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i)) - (dest (format #f "~a/~dx~d/apps/qutebrowser.png" - hicolor i i))) - (mkdir-p (dirname dest)) - (copy-file src dest))) - '(16 24 32 48 64 128 256 512)) - (install-file "icons/qutebrowser.svg" - (string-append hicolor "/scalable/apps")) - - (substitute* "qutebrowser.desktop" - (("Exec=qutebrowser") - (string-append "Exec=" out "/bin/qutebrowser"))) - (install-file "qutebrowser.desktop" app) - #t)))))) + (invoke "make" "-f" "misc/Makefile" + (string-append "DESTDIR=" (assoc-ref outputs "out")) + "PREFIX=" + "install") + #t)) + (add-after 'wrap 'wrap-more + (lambda* (#:key inputs outputs #:allow-other-keys) + (wrap-program (string-append (assoc-ref outputs "out") "/bin/qutebrowser") + `("PATH" prefix + (,(string-append (assoc-ref inputs "qtwebengine") "/lib/qt5/libexec/"))) + `("LD_LIBRARY_PATH" prefix + (,(string-append (assoc-ref inputs "sqlite") "/lib")))) + #t)) + ))) (home-page "https://qutebrowser.org/") (synopsis "Minimal, keyboard-focused, vim-like web browser") (description "qutebrowser is a keyboard-focused browser with a minimal -GUI. It is based on PyQt5 and QtWebKit.") +GUI. It is based on PyQt5 and supports two web renderers: QtWebKit and +QtWebEngine.") (license license:gpl3+))) (define-public vimb -- 2.21.0