Subject: [PATCH] gnu: Add qutebrowser/wayland.
From: "Wamm K. D" <[email-masked]>
To: [email-masked]
Cc: "Wamm K. D" <[email-masked]>
Date: Wed, 17 May 2023 15:00:05 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/web-browsers.scm (qutebrowser/wayland): New variable.
---
Create a package that can be used with Wayland, like UnGoogled
Chromium and Icecat have.

 gnu/packages/web-browsers.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 33de0039838..eec818f9261 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2021 Alexander Krotov <[email-masked]>
 ;;; Copyright © 2020 Hartmut Goebel <[email-masked]>
 ;;; Copyright © 2021 Christopher Howard <[email-masked]>
+;;; Copyright © 2023 Wamm K. D. <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -548,6 +549,21 @@ (define-public qutebrowser
 GUI.  It is based on PyQt5 and QtWebEngine.")
     (license license:gpl3+)))
 
+(define-public qutebrowser/wayland
+  (package/inherit qutebrowser
+    (name "qutebrowser-wayland")
+    (inputs (modify-inputs (package-inputs qutebrowser)
+              (prepend qtwayland-5)))
+    (arguments (substitute-keyword-arguments (package-arguments qutebrowser)
+                 ((#:phases phases)
+                  #~(modify-phases #$phases
+                      (add-after 'wrap-qt-process-path 'wrap-qtwebengine-path
+                        (lambda* (#:key inputs outputs #:allow-other-keys)
+                          (wrap-program (search-input-file outputs "bin/qutebrowser")
+                            `("QT_PLUGIN_PATH" =
+                              (,(string-append (assoc-ref inputs "qtwayland")
+                                               "/lib/qt5/plugins/"))))))))))))
+
 (define-public vimb
   (package
     (name "vimb")
-- 
2.40.1