72dbee10cf4f125d8b90ad5ca627d1c2be81e805
[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 python)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages check)
34 #:use-module (gnu packages crates-io)
35 #:use-module (gnu packages curl)
36 #:use-module (gnu packages documentation)
37 #:use-module (gnu packages gettext)
38 #:use-module (gnu packages glib)
39 #:use-module (gnu packages gnome)
40 #:use-module (gnu packages gstreamer)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages python-check)
46 #:use-module (gnu packages python-xyz)
47 #:use-module (gnu packages python-web)
48 #:use-module (gnu packages ruby)
49 #:use-module (gnu packages sqlite)
50 #:use-module (gnu packages tls)
51 #:use-module (gnu packages web)
52 #:use-module (gnu packages webkit)
53 #:use-module (gnu packages xml)
54 #:use-module (srfi srfi-1))
55
56 (define-public newsboat
57 (package
58 (name "newsboat")
59 (version "2.22")
60 (source
61 (origin
62 (method url-fetch)
63 (uri (string-append "https://newsboat.org/releases/" version
64 "/newsboat-" version ".tar.xz"))
65 (sha256
66 (base32
67 "146p3j46hna1m8zlacb9q1ljnldwv6xrjbaplm94f2x0v4azi1jj"))))
68 (build-system cargo-build-system)
69 (native-inputs
70 `(("gettext" ,gettext-minimal)
71 ("openssl" ,openssl)
72 ("pkg-config" ,pkg-config)
73 ;; For building documentation.
74 ("asciidoctor" ,ruby-asciidoctor)))
75 (inputs
76 `(("curl" ,curl)
77 ("json-c" ,json-c)
78 ("libxml2" ,libxml2)
79 ("ncurses" ,ncurses)
80 ("stfl" ,stfl)
81 ("sqlite" ,sqlite)))
82 (arguments
83 `(#:modules ((guix build cargo-build-system)
84 (guix build utils)
85 ((guix build gnu-build-system) #:prefix gnu:))
86 #:vendor-dir "vendor"
87 #:cargo-inputs
88 (("rust-backtrace" ,rust-backtrace-0.3)
89 ("rust-bitflags" ,rust-bitflags-1)
90 ("rust-chrono" ,rust-chrono-0.4)
91 ("rust-clap" ,rust-clap-2)
92 ("rust-curl-sys" ,rust-curl-sys-0.4)
93 ("rust-cxx" ,rust-cxx-0.5)
94 ("rust-cxx-build" ,rust-cxx-build-0.5)
95 ("rust-gettext-rs" ,rust-gettext-rs-0.5)
96 ("rust-libc" ,rust-libc-0.2)
97 ("rust-natord" ,rust-natord-1.0)
98 ("rust-nom" ,rust-nom-6)
99 ("rust-once-cell" ,rust-once-cell-1)
100 ("rust-rand" ,rust-rand-0.7)
101 ("rust-url" ,rust-url-2)
102 ("rust-unicode-width" ,rust-unicode-width-0.1))
103 #:cargo-development-inputs
104 (("rust-tempfile" ,rust-tempfile-3)
105 ("rust-proptest" ,rust-proptest-0.9)
106 ("rust-section-testing" ,rust-section-testing-0.0))
107 #:phases
108 (modify-phases %standard-phases
109 (add-after 'configure 'dont-vendor-self
110 (lambda* (#:key vendor-dir #:allow-other-keys)
111 ;; Don't keep the whole tarball in the vendor directory
112 (delete-file-recursively
113 (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))
114 #t))
115 (add-after 'unpack 'patch-source
116 (lambda _
117 (substitute* "Makefile"
118 (("Cargo.lock") ""))
119 #t))
120 (replace 'build
121 (lambda* args
122 ((assoc-ref gnu:%standard-phases 'build)
123 #:make-flags
124 (list (string-append "prefix=" (assoc-ref %outputs "out"))))))
125 (replace 'check
126 (lambda* args
127 ((assoc-ref gnu:%standard-phases 'check)
128 #:test-target "test"
129 #:make-flags
130 (list (string-append "prefix=" (assoc-ref %outputs "out"))))))
131 (replace 'install
132 (lambda* args
133 ((assoc-ref gnu:%standard-phases 'install)
134 #:make-flags
135 (list (string-append "prefix=" (assoc-ref %outputs "out")))))))))
136 (native-search-paths
137 ;; Newsboat respects CURL_CA_BUNDLE.
138 (package-native-search-paths curl))
139 (home-page "https://newsboat.org/")
140 (synopsis "Text-mode RSS and Atom feed reader with podcast support")
141 (description "Newsboat is a feed reader for @dfn{RSS} and @dfn{Atom}, XML
142 formats widely used to transmit, publish, and syndicate news or blog articles.
143 It's designed for use on text terminals, and to have a coherent and easy-to-use
144 interface that might look familiar to @command{mutt} or @command{slrn} users.
145
146 Newsboat supports OPML import/exports, HTML rendering, podcasts (with
147 @command{podboat}), off-line reading, searching and storing articles to your
148 file system, and many more features.")
149 (license (list license:gpl2+ ; filter/*
150 license:expat)))) ; everything else
151
152 (define-public newsboat-2.13
153 (package
154 (inherit newsboat)
155 (version "2.13")
156 (source
157 (origin
158 (method url-fetch)
159 (uri (string-append "https://newsboat.org/releases/" version
160 "/newsboat-" version ".tar.xz"))
161 (sha256
162 (base32
163 "0pik1d98ydzqi6055vdbkjg5krwifbk2hy2f5jp5p1wcy2s16dn7"))))
164 (build-system gnu-build-system)
165 (native-inputs
166 `(,@(fold alist-delete (package-native-inputs newsboat)
167 '("asciidoctor" "openssl"))
168 ;; For building documentation.
169 ("asciidoc" ,asciidoc)))
170 (inputs
171 `(("json-c" ,json-c-0.13)
172 ,@(alist-delete "json-c" (package-inputs newsboat))))
173 (arguments
174 '(#:phases
175 (modify-phases %standard-phases
176 (delete 'configure) ; no configure script
177 (add-after 'build 'build-documentation
178 (lambda _
179 (invoke "make" "doc"))))
180 #:make-flags
181 (list (string-append "prefix=" (assoc-ref %outputs "out")))
182 #:test-target "test"))))
183
184 (define-public liferea
185 (package
186 (name "liferea")
187 (version "1.13.4")
188 (source
189 (origin
190 (method git-fetch)
191 (uri (git-reference
192 (url "https://github.com/lwindolf/liferea/")
193 (commit (string-append "v" version))))
194 (file-name (git-file-name name version))
195 (sha256
196 (base32 "1g9463bvswsm899j6dfhslcg6np70m5wq143mjicr24zy8d17bm7"))))
197 (build-system glib-or-gtk-build-system)
198 (arguments
199 `(#:phases
200 (modify-phases %standard-phases
201 (add-before 'configure 'prepare-build-environment
202 (lambda* (#:key inputs #:allow-other-keys)
203 ;; Workaround for https://github.com/lwindolf/liferea/issues/767.
204 (setenv "WEBKIT_DISABLE_COMPOSITING_MODE" "1")))
205 (add-after 'install 'wrap-gi-python
206 (lambda* (#:key inputs outputs #:allow-other-keys)
207 (let ((out (assoc-ref outputs "out"))
208 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
209 (python-path (getenv "PYTHONPATH")))
210 (wrap-program (string-append out "/bin/liferea")
211 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
212 `("PYTHONPATH" ":" prefix (,python-path))))
213 #t)))))
214 (native-inputs
215 `(("autoconf" ,autoconf)
216 ("automake" ,automake)
217 ("gettext" ,gettext-minimal)
218 ("glib:bin" ,glib "bin")
219 ("gobject-introspection" ,gobject-introspection)
220 ("intltool" ,intltool)
221 ("libtool" ,libtool)
222 ("pkg-config" ,pkg-config)
223 ("which" ,which)))
224 (inputs
225 `(("glib-networking" ,glib-networking)
226 ("gnome-keyring" ,gnome-keyring)
227 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
228 ("gstreamer" ,gstreamer)
229 ("json-glib" ,json-glib)
230 ("libnotify" ,libnotify)
231 ("libpeas" ,libpeas)
232 ("libsecret" ,libsecret)
233 ("libxml2" ,libxml2)
234 ("libxslt" ,libxslt)
235 ("python" ,python)
236 ("python-pycairo" ,python-pycairo)
237 ("python-pygobject" ,python-pygobject)
238 ("webkitgtk" ,webkitgtk)))
239 (home-page "https://lzone.de/liferea/")
240 (synopsis "News reader for GTK/GNOME")
241 (description "Liferea is a desktop feed reader/news aggregator that
242 brings together all of the content from your favorite subscriptions into
243 a simple interface that makes it easy to organize and browse feeds.")
244 (license license:gpl2+)))
245
246 (define-public rtv
247 (package
248 (name "rtv")
249 (version "1.27.0")
250 (source
251 (origin
252 (method url-fetch)
253 (uri (pypi-uri "rtv" version))
254 (sha256
255 (base32 "0hvw426y09l3yzwv2zkb9hifpfbg9wd1gg0y3z3pxcli6n3ii2wl"))))
256 (build-system python-build-system)
257 (arguments
258 '(#:phases
259 (modify-phases %standard-phases
260 (add-before 'check 'set-environment-variables
261 (lambda* (#:key inputs #:allow-other-keys)
262 (setenv "HOME" (getcwd))
263 (setenv "TERM" "linux")
264 (setenv "TERMINFO" (string-append (assoc-ref inputs "ncurses")
265 "/share/terminfo"))
266 #t)))
267 #:tests? #f)) ; tests fail: _curses.error: nocbreak() returned ERR
268 (propagated-inputs
269 `(("python-beautifulsoup4" ,python-beautifulsoup4)
270 ("python-decorator" ,python-decorator)
271 ("python-kitchen" ,python-kitchen)
272 ("python-requests" ,python-requests)
273 ("python-six" ,python-six)))
274 (native-inputs
275 `(("ncurses" ,ncurses)
276 ("python-coveralls" ,python-coveralls)
277 ("python-coverage" ,python-coverage)
278 ("python-mock" ,python-mock)
279 ("python-pylint" ,python-pylint)
280 ("python-pytest" ,python-pytest)
281 ("python-vcrpy" ,python-vcrpy)))
282 (home-page "https://github.com/michael-lazar/rtv")
283 (synopsis "Terminal viewer for Reddit (Reddit Terminal Viewer)")
284 (description
285 "RTV provides a text-based interface to view and interact with Reddit.")
286 (license (list license:expat
287 license:gpl3+)))) ; rtv/packages/praw
288
289 (define-public tuir
290 (package
291 (name "tuir")
292 (version "1.29.0")
293 (source
294 (origin
295 (method url-fetch)
296 (uri (pypi-uri "tuir" version))
297 (sha256
298 (base32
299 "06xb030ibphbrz4nsxm8mh3g60ld8xfp6kc3j6vi1k4ls5s4h79i"))))
300 (build-system python-build-system)
301 (arguments
302 `(#:phases
303 (modify-phases %standard-phases
304 (replace 'check
305 (lambda* (#:key inputs outputs #:allow-other-keys)
306 (add-installed-pythonpath inputs outputs)
307 (invoke "pytest"))))))
308 (inputs
309 `(("python-beautifulsoup4" ,python-beautifulsoup4)
310 ("python-decorator" ,python-decorator)
311 ("python-kitchen" ,python-kitchen)
312 ("python-requests" ,python-requests)
313 ("python-six" ,python-six)))
314 (native-inputs
315 `(("python-coverage" ,python-coverage)
316 ("python-coveralls" ,python-coveralls)
317 ("python-mock" ,python-mock)
318 ("python-pylint" ,python-pylint)
319 ("python-pytest" ,python-pytest)
320 ("python-vcrpy" ,python-vcrpy)))
321 (home-page "https://gitlab.com/ajak/tuir")
322 (synopsis "Terminal viewer for Reddit (Terminal UI for Reddit)")
323 (description
324 "Tuir provides a simple terminal viewer for Reddit (Terminal UI for Reddit).")
325 (license (list license:expat
326 license:gpl3+)))) ; tuir/packages/praw
327
328 (define-public rawdog
329 (package
330 (name "rawdog")
331 (version "2.23")
332 (source
333 (origin
334 (method url-fetch)
335 (uri (string-append "https://offog.org/files/rawdog-"
336 version ".tar.gz"))
337 (sha256
338 (base32
339 "18nyg19mwxyqdnykplkqmzb4n27vvrhvp639zai8f81gg9vdbsjp"))))
340 (build-system python-build-system)
341 (arguments
342 `(#:python ,python-2.7))
343 (inputs
344 `(("python2-feedparser" ,python2-feedparser)
345 ("python2-pytidylib" ,python2-pytidylib)))
346 (home-page "https://offog.org/code/rawdog/")
347 (synopsis "RSS Aggregator Without Delusions Of Grandeur")
348 (description
349 "@command{rawdog} is a feed aggregator, capable of producing a personal
350 \"river of news\" or a public \"planet\" page. It supports all common feed
351 formats, including all versions of RSS and Atom.")
352 (license license:gpl2+)))