Florian Thevissen <m...@florian-thevissen.de> writes:

> Hi,
>
> I'd very much like to see a recent qtwebengine-based qutebrowser 
> packaged in guix myself. I understand that in the past there were 
> concerns about the chromium dependency, as Marius wrote:
>
>  > As for the status of the Chromium patch, following the recent Pale 
> Moon discussion I no longer think it satisfies FSDG[1] requirements and 
> will have to take some further steps to properly hide the "Web Store".
>
> Chromium has now been integrated in guix proper about two weeks ago.
>
> Is there still anything that might speak against packaging qtwebengine, 
> and thus let us enjoy an up-to-date qutebrowser?

Hello!

I don't think there is anything preventing us from packaging
QtWebEngine.  In fact I have attached a patch that does just that.

I haven't fully audited the source yet, but they seem to be doing the
Right Thing (scrubbing non-free and otherwise unneeded stuff).

Can you try this patch and ideally get something else (Qutebrowser) to
use it?

Thanks!

From cd873b4b9f22371ef4fcb3990a927d529c81c614 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mba...@fastmail.com>
Date: Sun, 19 Aug 2018 18:36:55 +0200
Subject: [PATCH] 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 8179911539..1260465e78 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))
@@ -953,6 +964,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

Attachment: signature.asc
Description: PGP signature

Reply via email to