WIP: bees service
[jackhill/guix/guix.git] / gnu / packages / syndication.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages syndication)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix download)
24 #:use-module (guix git-download)
25 #:use-module (guix packages)
26 #:use-module (guix build-system cargo)
27 #:use-module (guix build-system glib-or-gtk)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system meson)
30 #:use-module (guix build-system python)
31 #:use-module (guix build-system qt)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages check)
36 #:use-module (gnu packages crates-io)
37 #:use-module (gnu packages curl)
38 #:use-module (gnu packages documentation)
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages gstreamer)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages kde-frameworks)
45 #:use-module (gnu packages ncurses)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages python-check)
49 #:use-module (gnu packages python-xyz)
50 #:use-module (gnu packages python-web)
51 #:use-module (gnu packages qt)
52 #:use-module (gnu packages ruby)
53 #:use-module (gnu packages sqlite)
54 #:use-module (gnu packages time)
55 #:use-module (gnu packages tls)
56 #:use-module (gnu packages video)
57 #:use-module (gnu packages web)
58 #:use-module (gnu packages webkit)
59 #:use-module (gnu packages xml)
60 #:use-module (srfi srfi-1))
61
62 (define-public newsboat
63 (package
64 (name "newsboat")
65 (version "2.22.1")
66 (source
67 (origin
68 (method url-fetch)
69 (uri (string-append "https://newsboat.org/releases/" version
70 "/newsboat-" version ".tar.xz"))
71 (sha256
72 (base32
73 "1476fmfw2hkrjwyr3f7k9316lzwnn2b1dbc51rybcxipqlfg8849"))))
74 (build-system cargo-build-system)
75 (native-inputs
76 `(("gettext" ,gettext-minimal)
77 ("openssl" ,openssl)
78 ("pkg-config" ,pkg-config)
79 ;; For building documentation.
80 ("asciidoctor" ,ruby-asciidoctor)))
81 (inputs
82 `(("curl" ,curl)
83 ("json-c" ,json-c)
84 ("libxml2" ,libxml2)
85 ("ncurses" ,ncurses)
86 ("stfl" ,stfl)
87 ("sqlite" ,sqlite)))
88 (arguments
89 `(#:modules ((guix build cargo-build-system)
90 (guix build utils)
91 ((guix build gnu-build-system) #:prefix gnu:))
92 #:vendor-dir "vendor"
93 #:install-source? #f
94 #:cargo-inputs
95 (("rust-backtrace" ,rust-backtrace-0.3)
96 ("rust-bitflags" ,rust-bitflags-1)
97 ("rust-chrono" ,rust-chrono-0.4)
98 ("rust-clap" ,rust-clap-2)
99 ("rust-curl-sys" ,rust-curl-sys-0.4)
100 ("rust-cxx" ,rust-cxx-0.5)
101 ("rust-cxx-build" ,rust-cxx-build-0.5)
102 ("rust-gettext-rs" ,rust-gettext-rs-0.5)
103 ("rust-libc" ,rust-libc-0.2)
104 ("rust-natord" ,rust-natord-1)
105 ("rust-nom" ,rust-nom-6)
106 ("rust-once-cell" ,rust-once-cell-1)
107 ("rust-rand" ,rust-rand-0.7)
108 ("rust-url" ,rust-url-2)
109 ("rust-unicode-width" ,rust-unicode-width-0.1))
110 #:cargo-development-inputs
111 (("rust-tempfile" ,rust-tempfile-3)
112 ("rust-proptest" ,rust-proptest-0.9)
113 ("rust-section-testing" ,rust-section-testing-0.0))
114 #:phases
115 (modify-phases %standard-phases
116 (add-after 'configure 'dont-vendor-self
117 (lambda* (#:key vendor-dir #:allow-other-keys)
118 ;; Don't keep the whole tarball in the vendor directory
119 (delete-file-recursively
120 (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))
121 #t))
122 (add-after 'unpack 'patch-source
123 (lambda _
124 (substitute* "Makefile"
125 (("Cargo.lock") ""))
126 #t))
127 (replace 'build
128 (lambda* args
129 ((assoc-ref gnu:%standard-phases 'build)
130 #:make-flags
131 (list (string-append "prefix=" (assoc-ref %outputs "out"))))))
132 (replace 'check
133 (lambda* args
134 ((assoc-ref gnu:%standard-phases 'check)
135 #:test-target "test"
136 #:make-flags
137 (list (string-append "prefix=" (assoc-ref %outputs "out"))))))
138 (replace 'install
139 (lambda* args
140 ((assoc-ref gnu:%standard-phases 'install)
141 #:make-flags
142 (list (string-append "prefix=" (assoc-ref %outputs "out")))))))))
143 (native-search-paths
144 ;; Newsboat respects CURL_CA_BUNDLE.
145 (package-native-search-paths curl))
146 (home-page "https://newsboat.org/")
147 (synopsis "Text-mode RSS and Atom feed reader with podcast support")
148 (description "Newsboat is a feed reader for @dfn{RSS} and @dfn{Atom}, XML
149 formats widely used to transmit, publish, and syndicate news or blog articles.
150 It's designed for use on text terminals, and to have a coherent and easy-to-use
151 interface that might look familiar to @command{mutt} or @command{slrn} users.
152
153 Newsboat supports OPML import/exports, HTML rendering, podcasts (with
154 @command{podboat}), off-line reading, searching and storing articles to your
155 file system, and many more features.")
156 (license (list license:gpl2+ ; filter/*
157 license:expat)))) ; everything else
158
159 (define-public newsboat-2.13
160 (package
161 (inherit newsboat)
162 (version "2.13")
163 (source
164 (origin
165 (method url-fetch)
166 (uri (string-append "https://newsboat.org/releases/" version
167 "/newsboat-" version ".tar.xz"))
168 (sha256
169 (base32
170 "0pik1d98ydzqi6055vdbkjg5krwifbk2hy2f5jp5p1wcy2s16dn7"))))
171 (build-system gnu-build-system)
172 (native-inputs
173 `(,@(fold alist-delete (package-native-inputs newsboat)
174 '("asciidoctor" "openssl"))
175 ;; For building documentation.
176 ("asciidoc" ,asciidoc)))
177 (inputs
178 `(("json-c" ,json-c-0.13)
179 ,@(alist-delete "json-c" (package-inputs newsboat))))
180 (arguments
181 '(#:phases
182 (modify-phases %standard-phases
183 (delete 'configure) ; no configure script
184 (add-after 'build 'build-documentation
185 (lambda _
186 (invoke "make" "doc"))))
187 #:make-flags
188 (list (string-append "prefix=" (assoc-ref %outputs "out")))
189 #:test-target "test"))))
190
191 (define-public liferea
192 (package
193 (name "liferea")
194 (version "1.13.4")
195 (source
196 (origin
197 (method git-fetch)
198 (uri (git-reference
199 (url "https://github.com/lwindolf/liferea/")
200 (commit (string-append "v" version))))
201 (file-name (git-file-name name version))
202 (sha256
203 (base32 "1g9463bvswsm899j6dfhslcg6np70m5wq143mjicr24zy8d17bm7"))))
204 (build-system glib-or-gtk-build-system)
205 (arguments
206 `(#:configure-flags
207 (list
208 "--disable-static")
209 #:phases
210 (modify-phases %standard-phases
211 (add-before 'configure 'prepare-build-environment
212 (lambda* (#:key inputs #:allow-other-keys)
213 ;; Workaround for https://github.com/lwindolf/liferea/issues/767.
214 (setenv "WEBKIT_DISABLE_COMPOSITING_MODE" "1")))
215 (add-after 'install 'wrap-gi-python
216 (lambda* (#:key inputs outputs #:allow-other-keys)
217 (let ((out (assoc-ref outputs "out"))
218 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
219 (python-path (getenv "PYTHONPATH")))
220 (wrap-program (string-append out "/bin/liferea")
221 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
222 `("PYTHONPATH" ":" prefix (,python-path))))
223 #t)))))
224 (native-inputs
225 `(("autoconf" ,autoconf)
226 ("automake" ,automake)
227 ("gettext" ,gettext-minimal)
228 ("glib:bin" ,glib "bin")
229 ("gobject-introspection" ,gobject-introspection)
230 ("intltool" ,intltool)
231 ("libtool" ,libtool)
232 ("pkg-config" ,pkg-config)
233 ("which" ,which)))
234 (inputs
235 `(("glib" ,glib)
236 ("glib-networking" ,glib-networking)
237 ("gnome-keyring" ,gnome-keyring)
238 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
239 ("gstreamer" ,gstreamer)
240 ("json-glib" ,json-glib)
241 ("libnotify" ,libnotify)
242 ("libpeas" ,libpeas)
243 ("libsecret" ,libsecret)
244 ("libsoup" ,libsoup)
245 ("libxml2" ,libxml2)
246 ("libxslt" ,libxslt)
247 ("pango" ,pango)
248 ("python" ,python)
249 ("python-pycairo" ,python-pycairo)
250 ("python-pygobject" ,python-pygobject)
251 ("sqlite" ,sqlite)
252 ("webkitgtk" ,webkitgtk)))
253 (home-page "https://lzone.de/liferea/")
254 (synopsis "News reader for GTK/GNOME")
255 (description "Liferea is a desktop feed reader/news aggregator that
256 brings together all of the content from your favorite subscriptions into
257 a simple interface that makes it easy to organize and browse feeds.")
258 (license license:gpl2+)))
259
260 (define-public rtv
261 (package
262 (name "rtv")
263 (version "1.27.0")
264 (source
265 (origin
266 (method url-fetch)
267 (uri (pypi-uri "rtv" version))
268 (sha256
269 (base32 "0hvw426y09l3yzwv2zkb9hifpfbg9wd1gg0y3z3pxcli6n3ii2wl"))))
270 (build-system python-build-system)
271 (arguments
272 '(#:phases
273 (modify-phases %standard-phases
274 (add-before 'check 'set-environment-variables
275 (lambda* (#:key inputs #:allow-other-keys)
276 (setenv "HOME" (getcwd))
277 (setenv "TERM" "linux")
278 (setenv "TERMINFO" (string-append (assoc-ref inputs "ncurses")
279 "/share/terminfo"))
280 #t)))
281 #:tests? #f)) ; tests fail: _curses.error: nocbreak() returned ERR
282 (propagated-inputs
283 `(("python-beautifulsoup4" ,python-beautifulsoup4)
284 ("python-decorator" ,python-decorator)
285 ("python-kitchen" ,python-kitchen)
286 ("python-requests" ,python-requests)
287 ("python-six" ,python-six)))
288 (native-inputs
289 `(("ncurses" ,ncurses)
290 ("python-coveralls" ,python-coveralls)
291 ("python-coverage" ,python-coverage)
292 ("python-mock" ,python-mock)
293 ("python-pylint" ,python-pylint)
294 ("python-pytest" ,python-pytest)
295 ("python-vcrpy" ,python-vcrpy)))
296 (home-page "https://github.com/michael-lazar/rtv")
297 (synopsis "Terminal viewer for Reddit (Reddit Terminal Viewer)")
298 (description
299 "RTV provides a text-based interface to view and interact with Reddit.")
300 (license (list license:expat
301 license:gpl3+)))) ; rtv/packages/praw
302
303 (define-public tuir
304 (package
305 (name "tuir")
306 (version "1.29.0")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (pypi-uri "tuir" version))
311 (sha256
312 (base32
313 "06xb030ibphbrz4nsxm8mh3g60ld8xfp6kc3j6vi1k4ls5s4h79i"))))
314 (build-system python-build-system)
315 (arguments
316 `(#:phases
317 (modify-phases %standard-phases
318 (replace 'check
319 (lambda* (#:key inputs outputs #:allow-other-keys)
320 (add-installed-pythonpath inputs outputs)
321 (invoke "pytest"))))))
322 (inputs
323 `(("python-beautifulsoup4" ,python-beautifulsoup4)
324 ("python-decorator" ,python-decorator)
325 ("python-kitchen" ,python-kitchen)
326 ("python-requests" ,python-requests)
327 ("python-six" ,python-six)))
328 (native-inputs
329 `(("python-coverage" ,python-coverage)
330 ("python-coveralls" ,python-coveralls)
331 ("python-mock" ,python-mock)
332 ("python-pylint" ,python-pylint)
333 ("python-pytest" ,python-pytest)
334 ("python-vcrpy" ,python-vcrpy)))
335 (home-page "https://gitlab.com/ajak/tuir")
336 (synopsis "Terminal viewer for Reddit (Terminal UI for Reddit)")
337 (description
338 "Tuir provides a simple terminal viewer for Reddit (Terminal UI for Reddit).")
339 (license (list license:expat
340 license:gpl3+)))) ; tuir/packages/praw
341
342 (define-public rawdog
343 (package
344 (name "rawdog")
345 (version "2.23")
346 (source
347 (origin
348 (method url-fetch)
349 (uri (string-append "https://offog.org/files/rawdog-"
350 version ".tar.gz"))
351 (sha256
352 (base32
353 "18nyg19mwxyqdnykplkqmzb4n27vvrhvp639zai8f81gg9vdbsjp"))))
354 (build-system python-build-system)
355 (arguments
356 `(#:python ,python-2.7))
357 (inputs
358 `(("python2-feedparser" ,python2-feedparser)
359 ("python2-pytidylib" ,python2-pytidylib)))
360 (home-page "https://offog.org/code/rawdog/")
361 (synopsis "RSS Aggregator Without Delusions Of Grandeur")
362 (description
363 "@command{rawdog} is a feed aggregator, capable of producing a personal
364 \"river of news\" or a public \"planet\" page. It supports all common feed
365 formats, including all versions of RSS and Atom.")
366 (license license:gpl2+)))
367
368 (define-public quiterss
369 (package
370 (name "quiterss")
371 (version "0.19.4")
372 (source (origin
373 (method git-fetch)
374 (uri (git-reference
375 (url "https://github.com/QuiteRSS/quiterss")
376 (commit version)))
377 (file-name (git-file-name name version))
378 (sha256
379 (base32
380 "1cgvl67vhn5y7bj5gbjbgk26bhb0196bgrgsp3r5fmrislarj8s6"))
381 (modules '((guix build utils)))
382 (snippet
383 '(begin
384 (substitute* (find-files "." "\\.cpp$")
385 ;; Disable Google Analytics spyware by default,
386 ;; removing completely is not trivial.
387 (("settings\\.value\\(\"Settings/statisticsEnabled2\", true\\)")
388 "settings.value(\"Settings/statisticsEnabled2\", false)")
389 ;; Disable update check spyware by default, otherwise runs
390 ;; at every startup, nasty. Not needed on GNU Guix as a
391 ;; feature either way.
392 (("settings\\.value\\(\"Settings/updateCheckEnabled\", true\\)")
393 "settings.value(\"Settings/updateCheckEnabled\", false)"))
394 #t))))
395 (build-system qt-build-system)
396 (arguments
397 `(#:tests? #f ;; no test suite
398 #:phases
399 (modify-phases %standard-phases
400 (replace 'configure
401 (lambda* (#:key inputs outputs #:allow-other-keys)
402 (invoke "qmake" "CONFIG+=release"
403 (string-append "PREFIX="
404 (assoc-ref outputs "out"))
405 (string-append "QMAKE_LRELEASE="
406 (assoc-ref inputs "qttools")
407 "/bin/lrelease")))))))
408 (native-inputs
409 `(("pkg-config" ,pkg-config)
410 ("qttools" ,qttools)))
411 (inputs
412 `(("qtwebkit" ,qtwebkit)
413 ("qtbase" ,qtbase)
414 ("qtmultimedia" ,qtmultimedia)
415 ("phonon" ,phonon)
416 ("sqlite" ,sqlite)))
417 (home-page "https://quiterss.org/")
418 (synopsis "RSS/Atom news feeds reader written on Qt/C++")
419 (description "QuiteRSS is an RSS/Atom news feeds reader written on Qt/C++
420 that aims to be quite fast and comfortable to it's user.")
421 (license license:gpl3+)))
422
423 (define-public gfeeds
424 (package
425 (name "gfeeds")
426 (version "0.16.2")
427 (source (origin
428 (method url-fetch)
429 (uri
430 (string-append
431 "https://gitlab.gnome.org/World/gfeeds/-/archive/" version
432 "/gfeeds-" version ".tar.bz2"))
433 (sha256
434 (base32
435 "05gwwzqfz29m477imd5vh84jfla1wnklwpc2sdxnqli72wg08fli"))))
436 (build-system meson-build-system)
437 (arguments
438 `(#:phases
439 (modify-phases %standard-phases
440 (add-after 'unpack 'patch-mpv-path
441 (lambda* (#:key inputs #:allow-other-keys)
442 (substitute* "gfeeds/confManager.py"
443 (("mpv") (string-append (assoc-ref inputs "mpv") "/bin/mpv")))
444 #t))
445 (add-after 'install 'wrap-gfeeds
446 (lambda* (#:key outputs #:allow-other-keys)
447 (wrap-program (string-append
448 (assoc-ref outputs "out") "/bin/gfeeds")
449 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
450 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
451 `("XDG_DATA_DIRS" ":" prefix (,(getenv "XDG_DATA_DIRS"))))
452 #t)))))
453 (native-inputs
454 `(("glib:bin" ,glib "bin")
455 ("gobject-introspection" ,gobject-introspection)
456 ("gtk+:bin" ,gtk+ "bin")
457 ("pkg-config" ,pkg-config)))
458 (inputs
459 `(("glib" ,glib)
460 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
461 ("gtk+" ,gtk+)
462 ("hicolor-icon-theme" ,hicolor-icon-theme)
463 ("libhandy" ,libhandy)
464 ("mpv" ,mpv)
465 ("python" ,python)
466 ("python-beautifulsoup4" ,python-beautifulsoup4)
467 ("python-dateutil" ,python-dateutil)
468 ("python-feedparser" ,python-feedparser)
469 ("python-html5lib" ,python-html5lib)
470 ("python-listparser" ,python-listparser)
471 ("python-lxml" ,python-lxml)
472 ("python-pillow" ,python-pillow)
473 ("python-pygments" ,python-pygments)
474 ("python-pytz" ,python-pytz)
475 ("python-readability" ,python-readability)
476 ("python-requests" ,python-requests)
477 ("webkitgtk" ,webkitgtk)
478 ("python-pygobject" ,python-pygobject)))
479 (home-page "https://gfeeds.gabmus.org/")
480 (synopsis "Easy-to-use GTK+ RSS/Atom feed reader")
481 (description "Feeds is an RSS/Atom feed reader made with GTK+
482 and it has an easy-to-use graphical user interface.")
483 (license license:gpl3+)))