Subject: [bug#46823] [PATCH 3/3] gnu: Add gfeeds.

From: Léo Le Bouter <[email-masked]>
Date: Sat, 27 Feb 2021 23:36:31 +0100

* gnu/packages/gnome-xyz.scm (gfeeds): New variable.
---
 gnu/packages/gnome-xyz.scm | 68 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index aa7949478c..47288b76fe 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -31,6 +31,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system meson)
+  #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -45,11 +46,16 @@
   #:use-module (gnu packages inkscape)
   #:use-module (gnu packages image)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages ssh)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages ruby)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages webkit)
   #:use-module (gnu packages xml))
 
 (define-public arc-icon-theme
@@ -929,3 +935,65 @@ pallete.")
 outputs notifications to STDOUT in order to allow the user to process
 notifications any way they prefer.")
       (license license:expat))))
+
+(define-public gfeeds
+  (package
+    (name "gfeeds")
+    (version "0.16.2")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "https://gitlab.gnome.org/World/gfeeds/-/archive/" version
+                "/gfeeds-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "05gwwzqfz29m477imd5vh84jfla1wnklwpc2sdxnqli72wg08fli"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-mpv-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "gfeeds/confManager.py"
+               (("mpv") (string-append (assoc-ref inputs "mpv") "/bin/mpv")))
+             #t))
+         (add-after 'install 'wrap-gfeeds
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append
+                            (assoc-ref outputs "out") "/bin/gfeeds")
+               `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+               `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
+               `("XDG_DATA_DIRS" ":" prefix (,(getenv "XDG_DATA_DIRS"))))
+             #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("gobject-introspection" ,gobject-introspection)
+       ("glib:bin" ,glib "bin")
+       ("gtk+:bin" ,gtk+ "bin")))
+    (inputs
+     `(("python-pygobject" ,python-pygobject)
+       ("python-feedparser" ,python-feedparser)
+       ("python-pytz" ,python-pytz)
+       ("python-dateutil" ,python-dateutil)
+       ("python-requests" ,python-requests)
+       ("python-lxml" ,python-lxml)
+       ("python-html5lib" ,python-html5lib)
+       ("python-pillow" ,python-pillow)
+       ("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("python-readability" ,python-readability)
+       ("python-pygments" ,python-pygments)
+       ("python-listparser" ,python-listparser)
+       ("python" ,python)
+       ("mpv" ,mpv)
+       ("webkitgtk" ,webkitgtk)
+       ("libhandy" ,libhandy)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("hicolor-icon-theme" ,hicolor-icon-theme)))
+    (home-page "https://gfeeds.gabmus.org/")
+    (synopsis "Easy-to-use GTK+ RSS/Atom feed reader")
+    (description "An RSS/Atom feed reader made with GTK+ with an
+easy-to-use graphical user interface.")
+    (license license:gpl3+)))
-- 
2.30.1