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