Subject: [bug#40994] All patches attached

From: Raghav Gururajan <[email-masked]>
Date: Wed, 6 May 2020 05:41:19 -0400

From cf63b0c81a49c1d7649d7ce812aa6f116754d195 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 6 May 2020 05:38:38 -0400
Subject: [PATCH] gnu: Move girara from gtk.scm to pwmt.scm.

* gnu/packages/gtk.scm (girara): Move to [...]
* gnu/packages/pwmt.scm (girara): [...] here.
---
 gnu/local.mk          |  1 +
 gnu/packages/gtk.scm  | 49 -----------------------
 gnu/packages/pwmt.scm | 91 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 92 insertions(+), 49 deletions(-)
 create mode 100644 gnu/packages/pwmt.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 3c9a10b6bc..d73f6be33d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -430,6 +430,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/protobuf.scm			\
   %D%/packages/pure.scm				\
   %D%/packages/pv.scm				\
+  %D%/packages/pwmt.scm				\
   %D%/packages/python.scm			\
   %D%/packages/python-check.scm			\
   %D%/packages/python-compression.scm		\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index bea4850d15..4d093a0e0a 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1445,55 +1445,6 @@ In addition to the low level layout rendering routines, Pango includes
 and routines to assist in editing internationalized text.")
     (license license:lgpl2.1+)))
 
-(define-public girara
-  (package
-    (name "girara")
-    (version "0.3.4")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://git.pwmt.org/pwmt/girara")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
-    (native-inputs `(("pkg-config" ,pkg-config)
-                     ("check" ,check)
-                     ("gettext" ,gettext-minimal)
-                     ("glib:bin" ,glib "bin")
-                     ("xorg-server" ,xorg-server-for-tests)))
-    ;; Listed in 'Requires.private' of 'girara.pc'.
-    (propagated-inputs `(("gtk+" ,gtk+)))
-    (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-before 'check 'start-xserver
-                    ;; Tests require a running X server.
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((xorg-server (assoc-ref inputs "xorg-server"))
-                            (display ":1"))
-                        (setenv "DISPLAY" display)
-
-                        ;; On busy machines, tests may take longer than
-                        ;; the default of four seconds.
-                        (setenv "CK_DEFAULT_TIMEOUT" "20")
-
-                        ;; Don't fail due to missing '/etc/machine-id'.
-                        (setenv "DBUS_FATAL_WARNINGS" "0")
-                        (zero? (system (string-append xorg-server "/bin/Xvfb "
-                                                      display " &")))))))))
-    (build-system meson-build-system)
-    (home-page "https://pwmt.org/projects/girara/")
-    (synopsis "Library for minimalistic gtk+3 user interfaces")
-    (description "Girara is a library that implements a user interface that
-focuses on simplicity and minimalism.  Currently based on GTK+, a
-cross-platform widget toolkit, it provides an interface that focuses on three
-main components: a so-called view widget that represents the actual
-application, an input bar that is used to execute commands of the
-application and the status bar which provides the user with current
-information.")
-    (license license:zlib)))
-
 (define-public gtk-doc
   (package
     (name "gtk-doc")
diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
new file mode 100644
index 0000000000..8185cc40d9
--- /dev/null
+++ b/gnu/packages/pwmt.scm
@@ -0,0 +1,91 @@
+;;; GNU Guix --- Functional package management for GNU
+;;;
+;;; Copyright © 2015 Paul van der Walt <[email-masked]>
+;;; Copyright © 2016 ng0 <[email-masked]>
+;;; Copyright © 2017 2018 Marius Bakke <[email-masked]>
+;;; Copyright © 2017 Kei Kebreau <[email-masked]>
+;;; Copyright © 2018 2019 2020 Tobias Geerinckx-Rice <[email-masked]>
+;;; Copyright © 2020 Raghav Gururajan <[email-masked]>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages pwmt)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages xdisorg)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson))
+
+(define-public girara
+  (package
+    (name "girara")
+    (version "0.3.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.pwmt.org/pwmt/girara")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("check" ,check)
+                     ("gettext" ,gettext-minimal)
+                     ("glib:bin" ,glib "bin")
+                     ("xorg-server" ,xorg-server-for-tests)))
+    ;; Listed in 'Requires.private' of 'girara.pc'.
+    (propagated-inputs `(("gtk+" ,gtk+)))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'check 'start-xserver
+                    ;; Tests require a running X server.
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (let ((xorg-server (assoc-ref inputs "xorg-server"))
+                            (display ":1"))
+                        (setenv "DISPLAY" display)
+
+                        ;; On busy machines, tests may take longer than
+                        ;; the default of four seconds.
+                        (setenv "CK_DEFAULT_TIMEOUT" "20")
+
+                        ;; Don't fail due to missing '/etc/machine-id'.
+                        (setenv "DBUS_FATAL_WARNINGS" "0")
+                        (zero? (system (string-append xorg-server "/bin/Xvfb "
+                                                      display " &")))))))))
+    (build-system meson-build-system)
+    (home-page "https://pwmt.org/projects/girara/")
+    (synopsis "Library for minimalistic gtk+3 user interfaces")
+    (description "Girara is a library that implements a user interface that
+focuses on simplicity and minimalism.  Currently based on GTK+, a
+cross-platform widget toolkit, it provides an interface that focuses on three
+main components: a so-called view widget that represents the actual
+application, an input bar that is used to execute commands of the
+application and the status bar which provides the user with current
+information.")
+    (license license:zlib)))
\ No newline at end of file
-- 
2.26.2

>From 1b3a17d3d1fba5363f0f4357fb36a0366337c1e0 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 11:22:50 -0400
Subject: [PATCH 02/14] gnu: Move zathura from pdf.scm to pwmt.scm.

* gnu/packages/pdf.scm (zathura): Move to [...]
* gnu/packages/pwmt.scm (zathura): [...] here.
---
 gnu/packages/pdf.scm  | 58 -----------------------------------------
 gnu/packages/pwmt.scm | 60 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 58 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 71b8177582..ff75e1ed55 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -577,64 +577,6 @@ by using the @code{mupdf} rendering library.")
 by using the poppler rendering engine.")
     (license license:zlib)))
 
-(define-public zathura
-  (package
-    (name "zathura")
-    (version "0.4.5")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura/download/zathura-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "0b3nrcvykkpv2vm99kijnic2gpfzva520bsjlihaxandzfm9ff8c"))))
-    (native-inputs `(("pkg-config" ,pkg-config)
-                     ("gettext" ,gettext-minimal)
-                     ("glib:bin" ,glib "bin")
-
-                     ;; For building documentation.
-                     ("python-sphinx" ,python-sphinx)
-
-                     ;; For building icons.
-                     ("librsvg" ,librsvg)
-
-                     ;; For tests.
-                     ("check" ,check)
-                     ("xorg-server" ,xorg-server-for-tests)))
-    (inputs `(("sqlite" ,sqlite)))
-    ;; Listed in 'Requires.private' of 'zathura.pc'.
-    (propagated-inputs `(("cairo" ,cairo)
-                         ("girara" ,girara)))
-    (native-search-paths
-     (list (search-path-specification
-            (variable "ZATHURA_PLUGINS_PATH")
-            (files '("lib/zathura")))))
-    (build-system meson-build-system)
-    (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-before 'check 'start-xserver
-                    ;; Tests require a running X server.
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((xorg-server (assoc-ref inputs "xorg-server"))
-                            (display ":1"))
-                        (setenv "DISPLAY" display)
-
-                        ;; On busy machines, tests may take longer than
-                        ;; the default of four seconds.
-                        (setenv "CK_DEFAULT_TIMEOUT" "20")
-
-                        ;; Don't fail due to missing '/etc/machine-id'.
-                        (setenv "DBUS_FATAL_WARNINGS" "0")
-                        (zero? (system (string-append xorg-server "/bin/Xvfb "
-                                                      display " &")))))))))
-    (home-page "https://pwmt.org/projects/zathura/")
-    (synopsis "Lightweight keyboard-driven PDF viewer")
-    (description "Zathura is a customizable document viewer.  It provides a
-minimalistic interface and an interface that mainly focuses on keyboard
-interaction.")
-    (license license:zlib)))
-
 (define-public podofo
   (package
     (name "podofo")
diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 8185cc40d9..5702041f72 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -31,6 +31,8 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
@@ -88,4 +90,62 @@ main components: a so-called view widget that represents the actual
 application, an input bar that is used to execute commands of the
 application and the status bar which provides the user with current
 information.")
+    (license license:zlib)))
+
+(define-public zathura
+  (package
+    (name "zathura")
+    (version "0.4.5")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://pwmt.org/projects/zathura/download/zathura-"
+                              version ".tar.xz"))
+              (sha256
+               (base32
+                "0b3nrcvykkpv2vm99kijnic2gpfzva520bsjlihaxandzfm9ff8c"))))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("gettext" ,gettext-minimal)
+                     ("glib:bin" ,glib "bin")
+
+                     ;; For building documentation.
+                     ("python-sphinx" ,python-sphinx)
+
+                     ;; For building icons.
+                     ("librsvg" ,librsvg)
+
+                     ;; For tests.
+                     ("check" ,check)
+                     ("xorg-server" ,xorg-server-for-tests)))
+    (inputs `(("sqlite" ,sqlite)))
+    ;; Listed in 'Requires.private' of 'zathura.pc'.
+    (propagated-inputs `(("cairo" ,cairo)
+                         ("girara" ,girara)))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "ZATHURA_PLUGINS_PATH")
+            (files '("lib/zathura")))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'check 'start-xserver
+                    ;; Tests require a running X server.
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (let ((xorg-server (assoc-ref inputs "xorg-server"))
+                            (display ":1"))
+                        (setenv "DISPLAY" display)
+
+                        ;; On busy machines, tests may take longer than
+                        ;; the default of four seconds.
+                        (setenv "CK_DEFAULT_TIMEOUT" "20")
+
+                        ;; Don't fail due to missing '/etc/machine-id'.
+                        (setenv "DBUS_FATAL_WARNINGS" "0")
+                        (zero? (system (string-append xorg-server "/bin/Xvfb "
+                                                      display " &")))))))))
+    (home-page "https://pwmt.org/projects/zathura/")
+    (synopsis "Lightweight keyboard-driven PDF viewer")
+    (description "Zathura is a customizable document viewer.  It provides a
+minimalistic interface and an interface that mainly focuses on keyboard
+interaction.")
     (license license:zlib)))
\ No newline at end of file
-- 
2.26.2

>From 0096754a6564ea8dfa7826aeb897fbce28bd7016 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 11:27:02 -0400
Subject: [PATCH 03/14] gnu: Move zathura-ps from pdf.scm to pwmt.scm.

* gnu/packages/pdf.scm (zathura-ps): Move to [...]
* gnu/packages/pwmt.scm (zathura-ps): [...] here.
---
 gnu/packages/pdf.scm  | 35 -----------------------------------
 gnu/packages/pwmt.scm | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index ff75e1ed55..c5539c7df5 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -426,41 +426,6 @@ reading and editing of existing PDF files.")
 using libarchive.")
     (license license:zlib)))
 
-(define-public zathura-ps
-  (package
-    (name "zathura-ps")
-    (version "0.2.6")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs `(("libspectre" ,libspectre)
-              ("zathura" ,zathura)))
-    (build-system meson-build-system)
-    (arguments
-     `(#:tests? #f                      ; package does not contain tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-plugin-directory
-           ;; Something of a regression in 0.2.6: the new Meson build system
-           ;; now hard-codes an incorrect plugin directory.  Fix it.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "meson.build"
-               (("(install_dir:).*" _ key)
-                (string-append key
-                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
-             #t)))))
-    (home-page "https://pwmt.org/projects/zathura-ps/")
-    (synopsis "PS support for zathura (libspectre backend)")
-    (description "The zathura-ps plugin adds PS support to zathura
-using libspectre.")
-    (license license:zlib)))
-
 (define-public zathura-djvu
   (package
     (name "zathura-djvu")
diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 5702041f72..5881cf5c80 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -27,6 +27,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages gettext)
+  #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
@@ -148,4 +149,39 @@ information.")
     (description "Zathura is a customizable document viewer.  It provides a
 minimalistic interface and an interface that mainly focuses on keyboard
 interaction.")
+    (license license:zlib)))
+
+(define-public zathura-ps
+  (package
+    (name "zathura-ps")
+    (version "0.2.6")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
+                              version ".tar.xz"))
+              (sha256
+               (base32
+                "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y"))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs `(("libspectre" ,libspectre)
+              ("zathura" ,zathura)))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f                      ; package does not contain tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-directory
+           ;; Something of a regression in 0.2.6: the new Meson build system
+           ;; now hard-codes an incorrect plugin directory.  Fix it.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("(install_dir:).*" _ key)
+                (string-append key
+                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
+             #t)))))
+    (home-page "https://pwmt.org/projects/zathura-ps/")
+    (synopsis "PS support for zathura (libspectre backend)")
+    (description "The zathura-ps plugin adds PS support to zathura
+using libspectre.")
     (license license:zlib)))
\ No newline at end of file
-- 
2.26.2

>From 47fc6ed3548bba6d65cf1d7c789d56e42cb5c106 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 11:53:48 -0400
Subject: [PATCH 04/14] gnu: Move zathura-pdf-poppler from pdf.scm to pwmt.scm.

* gnu/packages/pdf.scm (zathura-pdf-poppler): Move to [...]
* gnu/packages/pwmt.scm (zathura-pdf-poppler): [...] here.
---
 gnu/packages/pdf.scm  | 36 ------------------------------------
 gnu/packages/pwmt.scm | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 36 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index c5539c7df5..0aca1e707a 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -506,42 +506,6 @@ using the DjVuLibre library.")
 by using the @code{mupdf} rendering library.")
     (license license:zlib)))
 
-(define-public zathura-pdf-poppler
-  (package
-    (name "zathura-pdf-poppler")
-    (version "0.3.0")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "1vfl4vkyy3rf39r1sqaa7y8113bgkh2bkfq3nn2inis9mrykmk6m"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("poppler" ,poppler)
-       ("zathura" ,zathura)))
-    (build-system meson-build-system)
-    (arguments
-     `(#:tests? #f                      ; package does not include tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-plugin-directory
-           ;; Something of a regression in 0.2.9: the new Meson build system
-           ;; now hard-codes an incorrect plugin directory.  Fix it.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "meson.build"
-               (("(install_dir:).*" _ key)
-                (string-append key
-                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
-             #t)))))
-    (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
-    (synopsis "PDF support for zathura (poppler backend)")
-    (description "The zathura-pdf-poppler plugin adds PDF support to zathura
-by using the poppler rendering engine.")
-    (license license:zlib)))
-
 (define-public podofo
   (package
     (name "podofo")
diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 5881cf5c80..459281a0aa 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -31,6 +31,7 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
@@ -184,4 +185,40 @@ interaction.")
     (synopsis "PS support for zathura (libspectre backend)")
     (description "The zathura-ps plugin adds PS support to zathura
 using libspectre.")
+    (license license:zlib)))
+
+(define-public zathura-pdf-poppler
+  (package
+    (name "zathura-pdf-poppler")
+    (version "0.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
+                              version ".tar.xz"))
+              (sha256
+               (base32
+                "1vfl4vkyy3rf39r1sqaa7y8113bgkh2bkfq3nn2inis9mrykmk6m"))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("poppler" ,poppler)
+       ("zathura" ,zathura)))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f                      ; package does not include tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-directory
+           ;; Something of a regression in 0.2.9: the new Meson build system
+           ;; now hard-codes an incorrect plugin directory.  Fix it.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("(install_dir:).*" _ key)
+                (string-append key
+                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
+             #t)))))
+    (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
+    (synopsis "PDF support for zathura (poppler backend)")
+    (description "The zathura-pdf-poppler plugin adds PDF support to zathura
+by using the poppler rendering engine.")
     (license license:zlib)))
\ No newline at end of file
-- 
2.26.2

>From dc3d3b63f1c4beaeca29205cbb2ae29c7dd4654a Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 11:57:05 -0400
Subject: [PATCH 05/14] gnu: Move zathura-pdf-mupdf from pdf.scm to pwmt.scm.

* gnu/packages/pdf.scm (zathura-pdf-mupdf): Move to [...]
* gnu/packages/pwmt.scm (zathura-pdf-mupdf): [...] here.
---
 gnu/packages/pdf.scm  | 44 ----------------------------------------
 gnu/packages/pwmt.scm | 47 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 44 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 0aca1e707a..30a8ec20e6 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -462,50 +462,6 @@ using libarchive.")
 using the DjVuLibre library.")
     (license license:zlib)))
 
-(define-public zathura-pdf-mupdf
-  (package
-    (name "zathura-pdf-mupdf")
-    (version "0.3.5")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-pdf-mupdf"
-                              "/download/zathura-pdf-mupdf-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1pjwsb7zwclxsvz229fl7y2saf1pv3ifwv3ay8viqxgrp9x3z9hq"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("jbig2dec" ,jbig2dec)
-       ("libjpeg" ,libjpeg)
-       ("mujs" ,mujs)
-       ("mupdf" ,mupdf)
-       ("openjpeg" ,openjpeg)
-       ("openssl" ,openssl)
-       ("zathura" ,zathura)))
-    (build-system meson-build-system)
-    (arguments
-     `(#:tests? #f                      ; package does not contain tests
-       #:configure-flags (list (string-append "-Dplugindir="
-                                              (assoc-ref %outputs "out")
-                                              "/lib/zathura")
-                               "-Dlink-external=true")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'add-mujs-to-dependencies
-           (lambda _
-             ;; Add mujs to the 'build_dependencies'.
-             (substitute* "meson.build"
-               (("^  libopenjp2 = dependency.*" x)
-                (string-append x "  mujs = cc.find_library('mujs')\n"))
-               (("^    libopenjp2")
-                "    libopenjp2, mujs")))))))
-    (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
-    (synopsis "PDF support for zathura (mupdf backend)")
-    (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
-by using the @code{mupdf} rendering library.")
-    (license license:zlib)))
-
 (define-public podofo
   (package
     (name "podofo")
diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 459281a0aa..1399c137a7 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -31,10 +31,13 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages javascript)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
@@ -221,4 +224,48 @@ using libspectre.")
     (synopsis "PDF support for zathura (poppler backend)")
     (description "The zathura-pdf-poppler plugin adds PDF support to zathura
 by using the poppler rendering engine.")
+    (license license:zlib)))
+
+(define-public zathura-pdf-mupdf
+  (package
+    (name "zathura-pdf-mupdf")
+    (version "0.3.5")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://pwmt.org/projects/zathura-pdf-mupdf"
+                              "/download/zathura-pdf-mupdf-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1pjwsb7zwclxsvz229fl7y2saf1pv3ifwv3ay8viqxgrp9x3z9hq"))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("jbig2dec" ,jbig2dec)
+       ("libjpeg" ,libjpeg)
+       ("mujs" ,mujs)
+       ("mupdf" ,mupdf)
+       ("openjpeg" ,openjpeg)
+       ("openssl" ,openssl)
+       ("zathura" ,zathura)))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f                      ; package does not contain tests
+       #:configure-flags (list (string-append "-Dplugindir="
+                                              (assoc-ref %outputs "out")
+                                              "/lib/zathura")
+                               "-Dlink-external=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'add-mujs-to-dependencies
+           (lambda _
+             ;; Add mujs to the 'build_dependencies'.
+             (substitute* "meson.build"
+               (("^  libopenjp2 = dependency.*" x)
+                (string-append x "  mujs = cc.find_library('mujs')\n"))
+               (("^    libopenjp2")
+                "    libopenjp2, mujs")))))))
+    (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
+    (synopsis "PDF support for zathura (mupdf backend)")
+    (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
+by using the @code{mupdf} rendering library.")
     (license license:zlib)))
\ No newline at end of file
-- 
2.26.2

>From 01abedd8f26bcc9df7b27d9905f0afa3a399a378 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 12:00:08 -0400
Subject: [PATCH 06/14] gnu: Move zathura-djvu from pdf.scm to pwmt.scm.

* gnu/packages/pdf.scm (zathura-djvu): Move to [...]
* gnu/packages/pwmt.scm (zathura-djvu): [...] here.
---
 gnu/packages/pdf.scm  | 36 ------------------------------------
 gnu/packages/pwmt.scm | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 36 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 30a8ec20e6..6949ca4750 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -426,42 +426,6 @@ reading and editing of existing PDF files.")
 using libarchive.")
     (license license:zlib)))
 
-(define-public zathura-djvu
-  (package
-    (name "zathura-djvu")
-    (version "0.2.9")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "0062n236414db7q7pnn3ccg5111ghxj3407pn9ri08skxskgirln"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("djvulibre" ,djvulibre)
-       ("zathura" ,zathura)))
-    (build-system meson-build-system)
-    (arguments
-     `(#:tests? #f                      ; package does not contain tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-plugin-directory
-           ;; Something of a regression in 0.2.8: the new Meson build system
-           ;; now hard-codes an incorrect plugin directory.  Fix it.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "meson.build"
-               (("(install_dir:).*" _ key)
-                (string-append key
-                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
-             #t)))))
-    (home-page "https://pwmt.org/projects/zathura-djvu/")
-    (synopsis "DjVu support for zathura (DjVuLibre backend)")
-    (description "The zathura-djvu plugin adds DjVu support to zathura
-using the DjVuLibre library.")
-    (license license:zlib)))
-
 (define-public podofo
   (package
     (name "podofo")
diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 1399c137a7..1662ee6d45 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -25,6 +25,7 @@
 (define-module (gnu packages pwmt)
   #:use-module (gnu packages)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages djvu)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
@@ -268,4 +269,40 @@ by using the poppler rendering engine.")
     (synopsis "PDF support for zathura (mupdf backend)")
     (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
 by using the @code{mupdf} rendering library.")
+    (license license:zlib)))
+
+(define-public zathura-djvu
+  (package
+    (name "zathura-djvu")
+    (version "0.2.9")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
+                              version ".tar.xz"))
+              (sha256
+               (base32
+                "0062n236414db7q7pnn3ccg5111ghxj3407pn9ri08skxskgirln"))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("djvulibre" ,djvulibre)
+       ("zathura" ,zathura)))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f                      ; package does not contain tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-directory
+           ;; Something of a regression in 0.2.8: the new Meson build system
+           ;; now hard-codes an incorrect plugin directory.  Fix it.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("(install_dir:).*" _ key)
+                (string-append key
+                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
+             #t)))))
+    (home-page "https://pwmt.org/projects/zathura-djvu/")
+    (synopsis "DjVu support for zathura (DjVuLibre backend)")
+    (description "The zathura-djvu plugin adds DjVu support to zathura
+using the DjVuLibre library.")
     (license license:zlib)))
\ No newline at end of file
-- 
2.26.2

>From a9f155ad914c4f83a8d4220249d3cbf4fab096ac Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 12:01:58 -0400
Subject: [PATCH 07/14] gnu: Move zathura-cb from pdf.scm to pwmt.scm.

* gnu/packages/pdf.scm (zathura-cb): Move to [...]
* gnu/packages/pwmt.scm (zathura-cb): [...] here.
---
 gnu/packages/pdf.scm  | 35 -----------------------------------
 gnu/packages/pwmt.scm | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 6949ca4750..caae864979 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -391,41 +391,6 @@ reading and editing of existing PDF files.")
    (license license:gpl3)             ; or gpl2, but not gpl2+
    (home-page "https://www.xpdfreader.com/")))
 
-(define-public zathura-cb
-  (package
-    (name "zathura-cb")
-    (version "0.1.8")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "1i6cf0vks501cggwvfsl6qb7mdaf3sszdymphimfvnspw810faj5"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs `(("libarchive" ,libarchive)
-              ("zathura" ,zathura)))
-    (build-system meson-build-system)
-    (arguments
-     `(#:tests? #f                      ; package does not contain tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-plugin-directory
-           ;; Something of a regression in 0.1.8: the new Meson build system
-           ;; now hard-codes an incorrect plugin directory.  Fix it.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "meson.build"
-               (("(install_dir:).*" _ key)
-                (string-append key
-                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
-             #t)))))
-    (home-page "https://pwmt.org/projects/zathura-cb/")
-    (synopsis "Comic book support for zathura (libarchive backend)")
-    (description "The zathura-cb plugin adds comic book support to zathura
-using libarchive.")
-    (license license:zlib)))
-
 (define-public podofo
   (package
     (name "podofo")
diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 1662ee6d45..2516c62485 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -24,6 +24,7 @@
 
 (define-module (gnu packages pwmt)
   #:use-module (gnu packages)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages check)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages documentation)
@@ -305,4 +306,39 @@ by using the @code{mupdf} rendering library.")
     (synopsis "DjVu support for zathura (DjVuLibre backend)")
     (description "The zathura-djvu plugin adds DjVu support to zathura
 using the DjVuLibre library.")
+    (license license:zlib)))
+
+(define-public zathura-cb
+  (package
+    (name "zathura-cb")
+    (version "0.1.8")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
+                              version ".tar.xz"))
+              (sha256
+               (base32
+                "1i6cf0vks501cggwvfsl6qb7mdaf3sszdymphimfvnspw810faj5"))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs `(("libarchive" ,libarchive)
+              ("zathura" ,zathura)))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f                      ; package does not contain tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-directory
+           ;; Something of a regression in 0.1.8: the new Meson build system
+           ;; now hard-codes an incorrect plugin directory.  Fix it.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("(install_dir:).*" _ key)
+                (string-append key
+                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
+             #t)))))
+    (home-page "https://pwmt.org/projects/zathura-cb/")
+    (synopsis "Comic book support for zathura (libarchive backend)")
+    (description "The zathura-cb plugin adds comic book support to zathura
+using libarchive.")
     (license license:zlib)))
\ No newline at end of file
-- 
2.26.2

>From 30042d73a58f90971cd6c37bf56269bd3abb2533 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 22:28:44 -0400
Subject: [PATCH 08/14] gnu: girara: Update package definition.

* gnu/packages/pwmt.scm (girara):
[source]<origin>[method]: Changed from git-fetch to url-fetch; and
remove file-name field.
[arguments]<#:glib-or-gtk?>: New argument.
[arguments]<#:configure-flags>[-Dnotify]: New flag.
[native-inputs]<doxygen>: New input.
[inputs]<glib,gtk+,json-c,libnotify,pango>: New inputs.
[propagated-inputs]<gtk+>: Removed.
[synopsis]: Updated.
[description]: Updated.
---
 gnu/packages/pwmt.scm | 73 +++++++++++++++++++++++++------------------
 1 file changed, 42 insertions(+), 31 deletions(-)

diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 2516c62485..69007bde9a 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -56,38 +56,49 @@
     (version "0.3.4")
     (source
      (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://git.pwmt.org/pwmt/girara")
-             (commit version)))
-       (file-name (git-file-name name version))
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/girara/download/girara-"
+                       version ".tar.xz"))
        (sha256
-        (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
-    (native-inputs `(("pkg-config" ,pkg-config)
-                     ("check" ,check)
-                     ("gettext" ,gettext-minimal)
-                     ("glib:bin" ,glib "bin")
-                     ("xorg-server" ,xorg-server-for-tests)))
-    ;; Listed in 'Requires.private' of 'girara.pc'.
-    (propagated-inputs `(("gtk+" ,gtk+)))
-    (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-before 'check 'start-xserver
-                    ;; Tests require a running X server.
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((xorg-server (assoc-ref inputs "xorg-server"))
-                            (display ":1"))
-                        (setenv "DISPLAY" display)
-
-                        ;; On busy machines, tests may take longer than
-                        ;; the default of four seconds.
-                        (setenv "CK_DEFAULT_TIMEOUT" "20")
-
-                        ;; Don't fail due to missing '/etc/machine-id'.
-                        (setenv "DBUS_FATAL_WARNINGS" "0")
-                        (zero? (system (string-append xorg-server "/bin/Xvfb "
-                                                      display " &")))))))))
+        (base32 "0cmjdismdsx9a5l7zx54zkd33mgg3mx4ckpvc7aap3x6a1ddmz2i"))))
     (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t                ; To compile schemas
+       #:configure-flags
+       (list
+        "-Dnotify=enabled")             ; For notification support
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'start-xserver
+           ;; Tests require a running X server.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let
+                 ((xorg-server (assoc-ref inputs "xorg-server"))
+                  (display ":1"))
+               (setenv "DISPLAY" display)
+               ;; On busy machines, tests may take longer than
+               ;; the default of four seconds.
+               (setenv "CK_DEFAULT_TIMEOUT" "20")
+               ;; Don't fail due to missing '/etc/machine-id'.
+               (setenv "DBUS_FATAL_WARNINGS" "0")
+               (zero?
+                (system
+                 (string-append xorg-server "/bin/Xvfb "
+                                display " &")))))))))
+    (native-inputs
+     `(("check" ,check)                 ; For tests
+       ("doxygen" ,doxygen)             ; For docs
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("pkg-config" ,pkg-config)
+       ("xorg-server" ,xorg-server-for-tests))) ; For tests
+    (inputs
+     `(("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("json-c" ,json-c)          ; For configuration dumping support
+       ("libnotify" ,libnotify)    ; For notification support
+       ("pango" ,pango)))
     (home-page "https://pwmt.org/projects/girara/")
     (synopsis "Library for minimalistic gtk+3 user interfaces")
     (description "Girara is a library that implements a user interface that
@@ -341,4 +352,4 @@ using the DjVuLibre library.")
     (synopsis "Comic book support for zathura (libarchive backend)")
     (description "The zathura-cb plugin adds comic book support to zathura
 using libarchive.")
-    (license license:zlib)))
\ No newline at end of file
+    (license license:zlib)))
-- 
2.26.2

>From 7e3558dda412d33fffb7bb0668886f1ede3d14c8 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 23:29:28 -0400
Subject: [PATCH 09/14] gnu: zathura: Update package definition.

* gnu/packages/pwmt.scm (zathura):
[arguments]<#:glib-or-gtk?>: New argument.
[native-inputs]<desktop-fileutils,doxygen,python-breathe,python-
sphinx-rtd-theme>: New inputs.
[inputs]<appstream-glib,cairo,file,girara,glib,json-c,gtk+,libnotify,
libseccomp>: New inputs.
[propagated-inputs]<cairo,girara>: Removed.
[synopsis]: Updated.
[description]: Updated.
---
 gnu/packages/pwmt.scm | 113 ++++++++++++++++++++++++------------------
 1 file changed, 64 insertions(+), 49 deletions(-)

diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 69007bde9a..16173ffa60 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -28,6 +28,8 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages file)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages glib)
@@ -35,6 +37,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages javascript)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages sphinx)
@@ -114,58 +117,70 @@ information.")
   (package
     (name "zathura")
     (version "0.4.5")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura/download/zathura-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "0b3nrcvykkpv2vm99kijnic2gpfzva520bsjlihaxandzfm9ff8c"))))
-    (native-inputs `(("pkg-config" ,pkg-config)
-                     ("gettext" ,gettext-minimal)
-                     ("glib:bin" ,glib "bin")
-
-                     ;; For building documentation.
-                     ("python-sphinx" ,python-sphinx)
-
-                     ;; For building icons.
-                     ("librsvg" ,librsvg)
-
-                     ;; For tests.
-                     ("check" ,check)
-                     ("xorg-server" ,xorg-server-for-tests)))
-    (inputs `(("sqlite" ,sqlite)))
-    ;; Listed in 'Requires.private' of 'zathura.pc'.
-    (propagated-inputs `(("cairo" ,cairo)
-                         ("girara" ,girara)))
-    (native-search-paths
-     (list (search-path-specification
-            (variable "ZATHURA_PLUGINS_PATH")
-            (files '("lib/zathura")))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/zathura/download/zathura-"
+                       version ".tar.xz"))
+       (sha256
+        (base32
+         "0b3nrcvykkpv2vm99kijnic2gpfzva520bsjlihaxandzfm9ff8c"))))
     (build-system meson-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-before 'check 'start-xserver
-                    ;; Tests require a running X server.
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((xorg-server (assoc-ref inputs "xorg-server"))
-                            (display ":1"))
-                        (setenv "DISPLAY" display)
-
-                        ;; On busy machines, tests may take longer than
-                        ;; the default of four seconds.
-                        (setenv "CK_DEFAULT_TIMEOUT" "20")
-
-                        ;; Don't fail due to missing '/etc/machine-id'.
-                        (setenv "DBUS_FATAL_WARNINGS" "0")
-                        (zero? (system (string-append xorg-server "/bin/Xvfb "
-                                                      display " &")))))))))
+     `(#:glib-or-gtk? #t                ; To compile schemas
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'start-xserver
+           ;; Tests require a running X server.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let
+                 ((xorg-server (assoc-ref inputs "xorg-server"))
+                  (display ":1"))
+               (setenv "DISPLAY" display)
+               ;; On busy machines, tests may take longer than
+               ;; the default of four seconds.
+               (setenv "CK_DEFAULT_TIMEOUT" "20")
+               ;; Don't fail due to missing '/etc/machine-id'.
+               (setenv "DBUS_FATAL_WARNINGS" "0")
+               (zero?
+                (system
+                 (string-append xorg-server "/bin/Xvfb "
+                                display " &")))))))))
+    (native-inputs
+     `(("check" ,check)                 ; For tests
+       ("desktop-file-utils" ,desktop-file-utils)
+       ("doxygen" ,doxygen)             ; For docs
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("librsvg" ,librsvg)             ; For icons
+       ("pkg-config" ,pkg-config)
+       ("python-breathe" ,python-breathe)                   ; For docs
+       ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) ; For docs
+       ("python-sphinx" ,python-sphinx)                     ; For docs
+       ("xorg-server" ,xorg-server-for-tests))) ; For tests
+    (inputs
+     `(("appstream-glib" ,appstream-glib)
+       ("cairo" ,cairo)
+       ("file" ,file)                   ; For mime-type detection
+       ("girara" ,girara)
+       ("glib" ,glib)
+       ("json-c" ,json-c)          ; For configuration dumping support
+       ("gtk+" ,gtk+)
+       ("libnotify" ,libnotify)         ; For notification support
+       ("libseccomp" ,libseccomp)       ; For sandbox support
+       ("sqlite" ,sqlite)))             ; For database backend
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "ZATHURA_PLUGINS_PATH")
+       (files '("lib/zathura")))))
+    (synopsis "Document Viewer")
+    (description "Zathura is a highly customizable and functional document
+viewer based on the girara user interface library and several document
+libraries.  It currently supports multiple back-ends (PostScript, PDF, EPUB,
+DjVu and ComicBook) via plugins.")
     (home-page "https://pwmt.org/projects/zathura/")
-    (synopsis "Lightweight keyboard-driven PDF viewer")
-    (description "Zathura is a customizable document viewer.  It provides a
-minimalistic interface and an interface that mainly focuses on keyboard
-interaction.")
     (license license:zlib)))
 
 (define-public zathura-ps
-- 
2.26.2

>From 345a2b2ffc04c99fdfc3785ac6d19f053afd1b90 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 23:42:49 -0400
Subject: [PATCH 10/14] gnu: zathura-ps: Update package definition.

* gnu/packages/pwmt.scm (zathura-ps):
[arguments]<#:glib-or-gtk?>: New argument.
[inputs]<cairo,girara,glib,gtk+,json-c,libnotify>: New inputs.
[synopsis]: Updated.
[description]: Updated.
---
 gnu/packages/pwmt.scm | 44 ++++++++++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 16173ffa60..dcf041daa3 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -187,35 +187,45 @@ DjVu and ComicBook) via plugins.")
   (package
     (name "zathura-ps")
     (version "0.2.6")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs `(("libspectre" ,libspectre)
-              ("zathura" ,zathura)))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/zathura-ps/download/"
+                       "zathura-ps-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y"))))
     (build-system meson-build-system)
     (arguments
-     `(#:tests? #f                      ; package does not contain tests
+     `(#:tests? #f                      ; No target
+       #:glib-or-gtk? #t                ; To compile schemas
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-plugin-directory
-           ;; Something of a regression in 0.2.6: the new Meson build system
-           ;; now hard-codes an incorrect plugin directory.  Fix it.
+           ;; This package tries to install into directory of Zathura.
+           ;; That cannot be allowed. Fix it.
            (lambda* (#:key outputs #:allow-other-keys)
              (substitute* "meson.build"
                (("(install_dir:).*" _ key)
                 (string-append key
                                "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
              #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("cairo" ,cairo)
+       ("girara" ,girara)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("json-c" ,json-c)              ; To generate cargs for zathura
+       ("libnotify" ,libnotify)        ; To generate cargs for zathura
+       ("libspectre" ,libspectre)
+       ("zathura" ,zathura)))
+    (synopsis "PostScript support for zathura")
+    (description "The zathura-ps plugin adds PostScript support to zathura by
+using the libspectre library.")
     (home-page "https://pwmt.org/projects/zathura-ps/")
-    (synopsis "PS support for zathura (libspectre backend)")
-    (description "The zathura-ps plugin adds PS support to zathura
-using libspectre.")
     (license license:zlib)))
 
 (define-public zathura-pdf-poppler
-- 
2.26.2

>From 22da4d2b51929e18bbf656e3c29f4bc06ef17f48 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sat, 2 May 2020 23:50:03 -0400
Subject: [PATCH 11/14] gnu: zathura-pdf-poppler: Update package definition.

* gnu/packages/pwmt.scm (zathura-pdf-poppler):
[arguments]<#:glib-or-gtk?>: New argument.
[arguments]<#phases>['patch-plugin-directory]: Removed.
[arguments]<#:configure-flags>[-Dplugindir]: New flag.
[inputs]<cairo,giara,glib>: New inputs.
[synopsis]: Updated.
[description]: Updated.
---
 gnu/packages/pwmt.scm | 53 +++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 27 deletions(-)

diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index dcf041daa3..e9d97bbc89 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -232,36 +232,35 @@ using the libspectre library.")
   (package
     (name "zathura-pdf-poppler")
     (version "0.3.0")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "1vfl4vkyy3rf39r1sqaa7y8113bgkh2bkfq3nn2inis9mrykmk6m"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("poppler" ,poppler)
-       ("zathura" ,zathura)))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/"
+                       "zathura-pdf-poppler-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1vfl4vkyy3rf39r1sqaa7y8113bgkh2bkfq3nn2inis9mrykmk6m"))))
     (build-system meson-build-system)
     (arguments
-     `(#:tests? #f                      ; package does not include tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-plugin-directory
-           ;; Something of a regression in 0.2.9: the new Meson build system
-           ;; now hard-codes an incorrect plugin directory.  Fix it.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "meson.build"
-               (("(install_dir:).*" _ key)
-                (string-append key
-                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
-             #t)))))
+     `(#:tests? #f                      ; No target
+       #:glib-or-gtk? #t                ; To compile schemas
+       #:configure-flags
+       (list
+        (string-append "-Dplugindir="
+                       (assoc-ref %outputs "out") "/lib/zathura"))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("cairo" ,cairo)
+       ("girara" ,girara)
+       ("glib" ,glib)
+       ("poppler" ,poppler)
+       ("zathura" ,zathura)))
+    (synopsis "PDF support (poppler backend) for zathura")
+    (description "The zathura-pdf-poppler plugin adds PDF support to zathura by
+using the poppler rendering library.")
     (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
-    (synopsis "PDF support for zathura (poppler backend)")
-    (description "The zathura-pdf-poppler plugin adds PDF support to zathura
-by using the poppler rendering engine.")
     (license license:zlib)))
 
 (define-public zathura-pdf-mupdf
-- 
2.26.2

>From ee00e7e7e931d39a9afad36a203f7f28a39647cf Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sun, 3 May 2020 00:01:56 -0400
Subject: [PATCH 12/14] gnu: zathura-pdf-mupdf: Update package definition.

* gnu/packages/pwmt.scm (zathura-pdf-mupdf):
[arguments]<#:glib-or-gtk?>: New argument.
[inputs]<openssl>: Removed.
<cairo,girara,glib,gtk+,json-c,libnotify>: New inputs.
[synopsis]: Updated.
[description]: Updated.
---
 gnu/packages/pwmt.scm | 59 +++++++++++++++++++++++++------------------
 1 file changed, 34 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index e9d97bbc89..7c734c2111 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -267,30 +267,24 @@ using the poppler rendering library.")
   (package
     (name "zathura-pdf-mupdf")
     (version "0.3.5")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-pdf-mupdf"
-                              "/download/zathura-pdf-mupdf-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1pjwsb7zwclxsvz229fl7y2saf1pv3ifwv3ay8viqxgrp9x3z9hq"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("jbig2dec" ,jbig2dec)
-       ("libjpeg" ,libjpeg)
-       ("mujs" ,mujs)
-       ("mupdf" ,mupdf)
-       ("openjpeg" ,openjpeg)
-       ("openssl" ,openssl)
-       ("zathura" ,zathura)))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/zathura-pdf-mupdf/download/"
+                       "zathura-pdf-mupdf-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1pjwsb7zwclxsvz229fl7y2saf1pv3ifwv3ay8viqxgrp9x3z9hq"))))
     (build-system meson-build-system)
     (arguments
-     `(#:tests? #f                      ; package does not contain tests
-       #:configure-flags (list (string-append "-Dplugindir="
-                                              (assoc-ref %outputs "out")
-                                              "/lib/zathura")
-                               "-Dlink-external=true")
+     `(#:tests? #f                      ; No target
+       #:glib-or-gtk? #t                ; To compile schemas
+       #:configure-flags
+       (list
+        (string-append "-Dplugindir="
+                       (assoc-ref %outputs "out") "/lib/zathura")
+        "-Dlink-external=true")         ; For MuPDF external libraries
        #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'add-mujs-to-dependencies
@@ -301,10 +295,25 @@ using the poppler rendering library.")
                 (string-append x "  mujs = cc.find_library('mujs')\n"))
                (("^    libopenjp2")
                 "    libopenjp2, mujs")))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("cairo" ,cairo)
+       ("girara" ,girara)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("jbig2dec" ,jbig2dec)
+       ("json-c" ,json-c)              ; To generate cargs for zathura
+       ("libjpeg" ,libjpeg)
+       ("libnotify" ,libnotify)        ; To generate cargs for zathura
+       ("mujs" ,mujs)
+       ("mupdf" ,mupdf)
+       ("openjpeg" ,openjpeg)
+       ("zathura" ,zathura)))
+    (synopsis "PDF support (mupdf backend) for zathura")
+    (description "The zathura-pdf-mupdf plugin adds PDF support to zathura by
+using the mupdf rendering library.")
     (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
-    (synopsis "PDF support for zathura (mupdf backend)")
-    (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
-by using the @code{mupdf} rendering library.")
     (license license:zlib)))
 
 (define-public zathura-djvu
-- 
2.26.2

>From 806ae5789545cda66ff544e2c5e943fc1bb9fa28 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sun, 3 May 2020 00:11:35 -0400
Subject: [PATCH 13/14] gnu: zathura-djvu: Update package definition.

* gnu/packages/pwmt.scm (zathura-djvu):
[arguments]<#:glib-or-gtk?>: New argument.
<#:phases>['patch-plugin-directory]: Removed.
<#:configure-flags>[-Dplugindir]: New flag.
[inputs]<cairo,girara,glib,gtk+,json-c,libnotify>: New inputs.
[synopsis]: Updated.
[description]: Updated.
---
 gnu/packages/pwmt.scm | 56 ++++++++++++++++++++++---------------------
 1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 7c734c2111..5ad4cbe7f7 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -320,36 +320,38 @@ using the mupdf rendering library.")
   (package
     (name "zathura-djvu")
     (version "0.2.9")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "0062n236414db7q7pnn3ccg5111ghxj3407pn9ri08skxskgirln"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("djvulibre" ,djvulibre)
-       ("zathura" ,zathura)))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/zathura-djvu/download/"
+                       "zathura-djvu-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0062n236414db7q7pnn3ccg5111ghxj3407pn9ri08skxskgirln"))))
     (build-system meson-build-system)
     (arguments
-     `(#:tests? #f                      ; package does not contain tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-plugin-directory
-           ;; Something of a regression in 0.2.8: the new Meson build system
-           ;; now hard-codes an incorrect plugin directory.  Fix it.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "meson.build"
-               (("(install_dir:).*" _ key)
-                (string-append key
-                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
-             #t)))))
-    (home-page "https://pwmt.org/projects/zathura-djvu/")
-    (synopsis "DjVu support for zathura (DjVuLibre backend)")
+     `(#:tests? #f                      ; No target
+       #:glib-or-gtk? #t                ; To compile schemas
+       #:configure-flags
+       (list
+        (string-append "-Dplugindir="
+                       (assoc-ref %outputs "out") "/lib/zathura"))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("cairo" ,cairo)
+       ("djvulibre" ,djvulibre)
+       ("girara" ,girara)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("json-c" ,json-c)              ; To generate cargs for zathura
+       ("libnotify" ,libnotify)        ; To generate cargs for zathura
+       ("zathura" ,zathura)))
+    (synopsis "DjVu support for zathura")
     (description "The zathura-djvu plugin adds DjVu support to zathura
-using the DjVuLibre library.")
+using the DjVu library.")
+    (home-page "https://pwmt.org/projects/zathura-djvu/")
     (license license:zlib)))
 
 (define-public zathura-cb
-- 
2.26.2

>From 6b4e210a1bc4282f0ff07a6279f55a8f42706a86 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sun, 3 May 2020 00:18:21 -0400
Subject: [PATCH 14/14] gnu: zathura-cb: Update package definition.

* gnu/packages/pwmt.scm (zathura-cb):
[arguments]<#:glib-or-gtk?>: New argument.
[inputs]<cairo,girara,glib,gtk+,json-c,libnotify>: New inputs.
[synopsis]: Updated.
[description]: Updated.
---
 gnu/packages/pwmt.scm | 43 ++++++++++++++++++++++++++-----------------
 1 file changed, 26 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 5ad4cbe7f7..f361c91c00 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -358,33 +358,42 @@ using the DjVu library.")
   (package
     (name "zathura-cb")
     (version "0.1.8")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "1i6cf0vks501cggwvfsl6qb7mdaf3sszdymphimfvnspw810faj5"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs `(("libarchive" ,libarchive)
-              ("zathura" ,zathura)))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/zathura-cb/download/"
+                       "zathura-cb-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1i6cf0vks501cggwvfsl6qb7mdaf3sszdymphimfvnspw810faj5"))))
     (build-system meson-build-system)
     (arguments
-     `(#:tests? #f                      ; package does not contain tests
+     `(#:tests? #f                      ; No target
+       #:glib-or-gtk? #t                ; To compile schemas
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-plugin-directory
-           ;; Something of a regression in 0.1.8: the new Meson build system
-           ;; now hard-codes an incorrect plugin directory.  Fix it.
+           ;; This package tries to install into directory of Zathura.
+           ;; That cannot be allowed. Fix it.
            (lambda* (#:key outputs #:allow-other-keys)
              (substitute* "meson.build"
                (("(install_dir:).*" _ key)
                 (string-append key
                                "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
              #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("cairo" ,cairo)
+       ("girara" ,girara)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("json-c" ,json-c)              ; To generate cargs for zathura
+       ("libarchive" ,libarchive)
+       ("libnotify" ,libnotify)        ; To generate cargs for zathura
+       ("zathura" ,zathura)))
+    (synopsis "Comic book support for zathura")
+    (description "The zathura-cb plugin adds comic book support to zathura.")
     (home-page "https://pwmt.org/projects/zathura-cb/")
-    (synopsis "Comic book support for zathura (libarchive backend)")
-    (description "The zathura-cb plugin adds comic book support to zathura
-using libarchive.")
     (license license:zlib)))
-- 
2.26.2