1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016, 2017, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2018, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
5 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
6 ;;; Copyright © 2022 Luis Felipe López Acevedo <luis.felipe.la@protonmail.com>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages syndication)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix download)
26 #:use-module (guix git-download)
27 #:use-module (guix packages)
28 #:use-module (guix utils)
29 #:use-module (guix build-system cargo)
30 #:use-module (guix build-system glib-or-gtk)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system meson)
33 #:use-module (guix build-system python)
34 #:use-module (guix build-system qt)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages crates-io)
40 #:use-module (gnu packages curl)
41 #:use-module (gnu packages documentation)
42 #:use-module (gnu packages freedesktop)
43 #:use-module (gnu packages gettext)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gnome)
46 #:use-module (gnu packages gstreamer)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages kde-frameworks)
49 #:use-module (gnu packages ncurses)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages python-check)
53 #:use-module (gnu packages python-xyz)
54 #:use-module (gnu packages python-web)
55 #:use-module (gnu packages qt)
56 #:use-module (gnu packages ruby)
57 #:use-module (gnu packages rust)
58 #:use-module (gnu packages sqlite)
59 #:use-module (gnu packages time)
60 #:use-module (gnu packages tls)
61 #:use-module (gnu packages video)
62 #:use-module (gnu packages web)
63 #:use-module (gnu packages webkit)
64 #:use-module (gnu packages xml)
65 #:use-module (gnu packages xorg)
66 #:use-module (srfi srfi-1))
68 (define-public cawbird
76 (url "https://github.com/IBBoard/cawbird")
77 (commit (string-append "v"version))))
78 (file-name (git-file-name name version))
80 (base32 "17575cp5qcgsqf37y3xqg3vr6l2j8bbbkmy2c1l185rxghfacida"))))
81 (build-system meson-build-system)
85 ;; Cawbirds's default key and secret for OAuth process with twitter.
87 "-Dconsumer_key_base64=VmY5dG9yRFcyWk93MzJEZmhVdEk5Y3NMOA=="
88 "-Dconsumer_secret_base64=MThCRXIxbWRESDQ2Y0podzVtVU13SGUyVGlCRXhPb3BFRHhGYlB6ZkpybG5GdXZaSjI=")
90 (modify-phases %standard-phases
91 (add-after 'unpack 'disable-failing-tests
93 ;; These tests require networking.
94 (substitute* "tests/meson.build"
95 (("[ \t]*.*avatardownload.*$") "")
96 (("[ \t]*.*filters.*$") "")
97 (("[ \t]*.*friends.*$") "")
98 (("[ \t]*.*inlinemediadownloader.*$") "")
99 (("[ \t]*.*tweetparsing.*$") "")
100 (("[ \t]*.*usercounter.*$") ""))))
102 (add-after 'install 'custom-check
103 (lambda* (#:key outputs tests? #:allow-other-keys)
105 ;; Tests require a running X server.
106 (system "Xvfb :1 +extension GLX &")
107 (setenv "DISPLAY" ":1")
108 ;; Tests write to $HOME.
109 (setenv "HOME" (getcwd))
110 ;; Tests look for gsettings-schemas installed by the package.
111 (setenv "XDG_DATA_DIRS"
112 (string-append (getenv "XDG_DATA_DIRS")
113 ":" (assoc-ref outputs "out") "/share"))
114 (invoke "meson" "test"))))
115 (add-after 'glib-or-gtk-wrap 'wrap-paths
116 (lambda* (#:key outputs #:allow-other-keys)
117 (let* ((out (assoc-ref outputs "out"))
118 (bin (string-append out "/bin/"))
119 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
120 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
121 (wrap-program (string-append bin "cawbird")
122 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
123 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
125 `(("gettext" ,gettext-minimal)
126 ("glib:bin" ,glib "bin")
127 ("gobject-introspection" ,gobject-introspection)
128 ("gtk+:bin" ,gtk+ "bin")
129 ("pkg-config" ,pkg-config)
132 ("xorg-server" ,xorg-server-for-tests)))
135 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
137 ("gstreamer" ,gstreamer)
138 ("gst-libav" ,gst-libav)
139 ("gst-plugins-bad" ,gst-plugins-bad)
140 ("gst-plugins-base" ,gst-plugins-base)
141 ("gst-plugins-good" ,gst-plugins-good)
143 ("json-glib" ,json-glib)
144 ("liboauth" ,liboauth)
151 (synopsis "Client for Twitter")
152 (description "Cawbird is a Twitter client built with GTK and Vala.
153 It supports all features except non-mention notifications, polls, threads and
155 (home-page "https://ibboard.co.uk/cawbird/")
156 (license license:gpl3+)))
166 (url "https://gitlab.gnome.org/World/giara")
168 (file-name (git-file-name name version))
169 ;; To fix authentication while adding accounts.
170 (patches (search-patches "giara-fix-login.patch"))
172 (base32 "004qmkfrgd37axv0b6hfh6v7nx4pvy987k5yv4bmlmkj9sbqm6f9"))))
173 (build-system meson-build-system)
177 (modify-phases %standard-phases
178 (add-after 'glib-or-gtk-wrap 'wrap-paths
179 (lambda* (#:key outputs #:allow-other-keys)
180 (let* ((out (assoc-ref outputs "out"))
181 (bin (string-append out "/bin/"))
182 (lib (string-append out "/lib/python"
183 ,(version-major+minor
184 (package-version python))
186 (wrap-program (string-append bin "giara")
187 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH") ,lib))
188 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))))))))
190 `(("gettext" ,gettext-minimal)
191 ("glib:bin" ,glib "bin")
192 ("gobject-introspection" ,gobject-introspection)
193 ("gtk+:bin" ,gtk+ "bin")
194 ("pkg-config" ,pkg-config)
195 ("xmllint" ,libxml2)))
199 ("gtksourceview" ,gtksourceview)
200 ("libhandy" ,libhandy)
202 ("python-beautifulsoup" ,python-beautifulsoup4)
203 ("python-dateutil" ,python-dateutil)
204 ("python-mistune" ,python-mistune)
205 ("python-pillow" ,python-pillow)
206 ("python-praw" ,python-praw)
207 ("python-pycairo" ,python-pycairo)
208 ("python-pygobject" ,python-pygobject)
209 ("python-requests" ,python-requests)
210 ("webkitgtk" ,webkitgtk-with-libsoup2)))
213 (synopsis "Client for Reddit")
214 (description "Giara is a reddit app, built with Python, GTK and Handy.")
215 (home-page "https://giara.gabmus.org/")
216 (license license:gpl3+)))
218 (define-public newsboat
225 (uri (string-append "https://newsboat.org/releases/" version
226 "/newsboat-" version ".tar.xz"))
228 (base32 "061w86jffyi49m4d9n974a3pd1svbw3azmh0qx8h2v7h0178791l"))))
229 (build-system cargo-build-system)
231 `(("gettext" ,gettext-minimal)
233 ("pkg-config" ,pkg-config)
234 ;; For building documentation.
235 ("asciidoctor" ,ruby-asciidoctor)))
244 `(#:modules ((guix build cargo-build-system)
246 ((guix build gnu-build-system) #:prefix gnu:))
247 #:vendor-dir "vendor"
250 (("rust-backtrace" ,rust-backtrace-0.3)
251 ("rust-bitflags" ,rust-bitflags-1)
252 ("rust-chrono" ,rust-chrono-0.4)
253 ("rust-curl-sys" ,rust-curl-sys-0.4)
254 ("rust-cxx" ,rust-cxx-1)
255 ("rust-fastrand" ,rust-fastrand-1)
256 ("rust-gettext-rs" ,rust-gettext-rs-0.7)
257 ("rust-lexopt" ,rust-lexopt-0.2)
258 ("rust-libc" ,rust-libc-0.2)
259 ("rust-md5" ,rust-md5-0.7)
260 ("rust-natord" ,rust-natord-1)
261 ("rust-nom" ,rust-nom-7)
262 ("rust-once-cell" ,rust-once-cell-1)
263 ("rust-percent-encoding" ,rust-percent-encoding-2)
264 ("rust-url" ,rust-url-2)
265 ("rust-unicode-width" ,rust-unicode-width-0.1)
266 ("rust-xdg" ,rust-xdg-2))
267 #:cargo-development-inputs
268 (("rust-cxx-build" ,rust-cxx-build-1)
269 ("rust-tempfile" ,rust-tempfile-3)
270 ("rust-proptest" ,rust-proptest-1)
271 ("rust-section-testing" ,rust-section-testing-0.0))
273 (modify-phases %standard-phases
274 (add-after 'configure 'dont-vendor-self
275 (lambda* (#:key vendor-dir #:allow-other-keys)
276 ;; Don't keep the whole tarball in the vendor directory
277 (delete-file-recursively
278 (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))))
279 (add-after 'unpack 'patch-source
280 (lambda* (#:key outputs #:allow-other-keys)
281 (substitute* "Makefile"
283 ;; Replace the prefix in the Makefile.
284 (("/usr/local") (assoc-ref outputs "out")))))
286 (assoc-ref gnu:%standard-phases 'build))
289 ((assoc-ref gnu:%standard-phases 'check)
290 #:test-target "test")))
292 (assoc-ref gnu:%standard-phases 'install)))))
294 ;; Newsboat respects CURL_CA_BUNDLE.
295 (list (search-path-specification
296 (variable "CURL_CA_BUNDLE")
298 (separator #f) ;single entry
299 (files '("etc/ssl/certs/ca-certificates.crt")))))
300 (home-page "https://newsboat.org/")
301 (synopsis "Text-mode RSS and Atom feed reader with podcast support")
302 (description "Newsboat is a feed reader for @dfn{RSS} and @dfn{Atom}, XML
303 formats widely used to transmit, publish, and syndicate news or blog articles.
304 It's designed for use on text terminals, and to have a coherent and easy-to-use
305 interface that might look familiar to @command{mutt} or @command{slrn} users.
307 Newsboat supports OPML import/exports, HTML rendering, podcasts (with
308 @command{podboat}), off-line reading, searching and storing articles to your
309 file system, and many more features.")
310 (properties '((release-monitoring-url . "https://newsboat.org/news.atom")))
311 (license (list license:gpl2+ ; filter/*
312 license:expat)))) ; everything else
314 (define-public newsboat-2.13
321 (uri (string-append "https://newsboat.org/releases/" version
322 "/newsboat-" version ".tar.xz"))
325 "0pik1d98ydzqi6055vdbkjg5krwifbk2hy2f5jp5p1wcy2s16dn7"))))
326 (build-system gnu-build-system)
328 `(,@(fold alist-delete (package-native-inputs newsboat)
329 '("asciidoctor" "openssl"))
330 ;; For building documentation.
331 ("asciidoc" ,asciidoc)))
333 (modify-inputs (package-inputs newsboat)
334 (replace "json-c" json-c-0.13)))
337 (modify-phases %standard-phases
338 (delete 'configure) ; no configure script
339 (add-after 'build 'build-documentation
341 (invoke "make" "doc"))))
343 (list (string-append "prefix=" (assoc-ref %outputs "out")))
344 #:test-target "test"))))
346 (define-public liferea
354 (url "https://github.com/lwindolf/liferea/")
355 (commit (string-append "v" version))))
356 (file-name (git-file-name name version))
358 (base32 "1g9463bvswsm899j6dfhslcg6np70m5wq143mjicr24zy8d17bm7"))))
359 (build-system glib-or-gtk-build-system)
365 (modify-phases %standard-phases
366 (add-before 'configure 'prepare-build-environment
367 (lambda* (#:key inputs #:allow-other-keys)
368 ;; Workaround for https://github.com/lwindolf/liferea/issues/767.
369 (setenv "WEBKIT_DISABLE_COMPOSITING_MODE" "1")))
370 (add-after 'install 'wrap-gi-python
371 (lambda* (#:key inputs outputs #:allow-other-keys)
372 (let ((out (assoc-ref outputs "out"))
373 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
374 (python-path (getenv "GUIX_PYTHONPATH")))
375 (wrap-program (string-append out "/bin/liferea")
376 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
377 `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
384 gobject-introspection
393 gsettings-desktop-schemas
407 webkitgtk-with-libsoup2))
408 (home-page "https://lzone.de/liferea/")
409 (synopsis "News reader for GTK/GNOME")
410 (description "Liferea is a desktop feed reader/news aggregator that
411 brings together all of the content from your favorite subscriptions into
412 a simple interface that makes it easy to organize and browse feeds.")
413 (license license:gpl2+)))
422 (uri (pypi-uri "rtv" version))
424 (base32 "0hvw426y09l3yzwv2zkb9hifpfbg9wd1gg0y3z3pxcli6n3ii2wl"))))
425 (build-system python-build-system)
428 (modify-phases %standard-phases
429 (add-before 'check 'set-environment-variables
430 (lambda* (#:key inputs #:allow-other-keys)
431 (setenv "HOME" (getcwd))
432 (setenv "TERM" "linux")
434 (search-input-directory inputs "share/terminfo"))))
435 ;; Loading this as a library requires a controlling terminal, etc.
436 (delete 'sanity-check))
437 #:tests? #f)) ; tests fail: _curses.error: nocbreak() returned ERR
439 (list python-beautifulsoup4 python-decorator python-kitchen
440 python-requests python-six))
449 (home-page "https://github.com/michael-lazar/rtv")
450 (synopsis "Terminal viewer for Reddit (Reddit Terminal Viewer)")
452 "RTV provides a text-based interface to view and interact with Reddit.")
453 (license (list license:expat
454 license:gpl3+)))) ; rtv/packages/praw
463 (uri (pypi-uri "tuir" version))
466 "06xb030ibphbrz4nsxm8mh3g60ld8xfp6kc3j6vi1k4ls5s4h79i"))))
467 (build-system python-build-system)
470 (modify-phases %standard-phases
471 (delete 'sanity-check) ; Tries to read environment variables.
473 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
474 (add-installed-pythonpath inputs outputs)
476 (invoke "pytest")))))))
478 (list python-beautifulsoup4 python-decorator python-kitchen
479 python-requests python-six))
481 (list python-coverage
487 (home-page "https://gitlab.com/ajak/tuir")
488 (synopsis "Terminal viewer for Reddit (Terminal UI for Reddit)")
490 "Tuir provides a simple terminal viewer for Reddit (Terminal UI for Reddit).")
491 (license (list license:expat
492 license:gpl3+)))) ; tuir/packages/praw
494 (define-public gfeeds
502 "https://gitlab.gnome.org/World/gfeeds/-/archive/" version
503 "/gfeeds-" version ".tar.bz2"))
506 "05gwwzqfz29m477imd5vh84jfla1wnklwpc2sdxnqli72wg08fli"))))
507 (build-system meson-build-system)
510 (modify-phases %standard-phases
511 (add-after 'unpack 'patch-mpv-path
512 (lambda* (#:key inputs #:allow-other-keys)
513 (substitute* "gfeeds/confManager.py"
514 (("mpv") (search-input-file inputs "/bin/mpv")))
516 (add-after 'unpack 'patch-webkit2-version
517 (lambda* (#:key inputs #:allow-other-keys)
518 (substitute* "bin/gfeeds.in"
519 (("gi\\.require_version\\('WebKit2', '4\\.0'\\)")
520 "gi.require_version('WebKit2', '4.1')"))))
521 (add-after 'install 'wrap-gfeeds
522 (lambda* (#:key outputs #:allow-other-keys)
523 (wrap-program (string-append
524 (assoc-ref outputs "out") "/bin/gfeeds")
525 `("PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
526 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
527 `("XDG_DATA_DIRS" ":" prefix (,(getenv "XDG_DATA_DIRS"))))
530 `(("glib:bin" ,glib "bin")
531 ("gobject-introspection" ,gobject-introspection)
532 ("gtk+:bin" ,gtk+ "bin")
533 ("pkg-config" ,pkg-config)))
536 gsettings-desktop-schemas
542 python-beautifulsoup4
555 (home-page "https://gfeeds.gabmus.org/")
556 (synopsis "Easy-to-use GTK+ RSS/Atom feed reader")
557 (description "Feeds is an RSS/Atom feed reader made with GTK+
558 and it has an easy-to-use graphical user interface.")
559 (license license:gpl3+)))