projects/guix·blob python-team · refs

592 lines · 22.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016, 2017, 2019-2026 Efraim Flashner <[email protected]>
3;;; Copyright © 2018, 2019, 2021 Tobias Geerinckx-Rice <[email protected]>
4;;; Copyright © 2020, 2023 Vinicius Monego <[email protected]>
5;;; Copyright © 2021 Felix Gruber <[email protected]>
6;;; Copyright © 2022 Luis Felipe López Acevedo <[email protected]>
7;;; Copyright © 2022 Liliana Marie Prikler <[email protected]>
8;;; Copyright © 2023 Maxim Cournoyer <[email protected]>
9;;; Copyright © 2024 Luis Guilherme Coelho <[email protected]>
10;;; Copyright © 2024 Artyom V. Poptsov <[email protected]>
11;;; Copyright © 2025 Ashish SHUKLA <[email protected]>
12;;; Copyright © 2025 Andreas Enge <[email protected]>
13;;; Copyright © 2026 Nguyễn Gia Phong <[email protected]>
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages syndication)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix download)
33 #:use-module (guix fossil-download)
34 #:use-module (guix git-download)
35 #:use-module (guix packages)
36 #:use-module (guix utils)
37 #:use-module (guix gexp)
38 #:use-module (guix build-system cargo)
39 #:use-module (guix build-system glib-or-gtk)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system meson)
42 #:use-module (guix build-system pyproject)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages bash)
47 #:use-module (gnu packages build-tools)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages cmake)
50 #:use-module (gnu packages curl)
51 #:use-module (gnu packages freedesktop)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnome)
55 #:use-module (gnu packages gstreamer)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages man)
58 #:use-module (gnu packages ncurses)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages pretty-print)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages python-build)
63 #:use-module (gnu packages python-check)
64 #:use-module (gnu packages python-xyz)
65 #:use-module (gnu packages python-web)
66 #:use-module (gnu packages qt)
67 #:use-module (gnu packages ruby-xyz)
68 #:use-module (gnu packages rust)
69 #:use-module (gnu packages sqlite)
70 #:use-module (gnu packages time)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages video)
73 #:use-module (gnu packages web)
74 #:use-module (gnu packages webkit)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xorg)
77 #:use-module (srfi srfi-1))
78
79(define-public fead
80 (package
81 (name "fead")
82 (version "1.0.1")
83 (source
84 (origin
85 (method fossil-fetch)
86 (uri (fossil-reference
87 (uri "https://chim.loan/fead")
88 (check-in version)))
89 (sha256
90 (base32 "0pkj8wkxgm3jzkxfviagwi23kiypidavxpb4fi5mmcsp9k8wbpl4"))))
91 (build-system gnu-build-system)
92 (arguments
93 (list
94 #:tests? #f ;no test
95 #:make-flags #~(list (string-append "PREFIX=" #$output))
96 #:phases #~(modify-phases %standard-phases
97 (delete 'configure))))
98 (inputs (list python))
99 (native-inputs (list help2man))
100 (home-page "https://chim.loan/fead")
101 (synopsis "Advert generator from web feeds")
102 (description "Fead a tool for advertising other blogs you like on your own
103by embedding the summary of their latest posts extracted from their web feed.")
104 (license license:agpl3+)))
105
106(define-public giara
107 (package
108 (name "giara")
109 (version "1.1.0")
110 (source
111 (origin
112 (method git-fetch)
113 (uri (git-reference
114 (url "https://gitlab.gnome.org/World/giara")
115 (commit version)))
116 (file-name (git-file-name name version))
117 (sha256
118 (base32 "1s2lr7s2sqzvphl84zcf68l6lzhp5faycz75yp36ak18aw9b8g0m"))))
119 (build-system meson-build-system)
120 (arguments
121 `(#:glib-or-gtk? #t
122 #:phases
123 (modify-phases %standard-phases
124 (add-after 'unpack 'skip-icon-cache
125 (lambda _
126 (substitute* "meson_post_install.py"
127 (("gtk-update-icon-cache") "true"))))
128 (add-after 'unpack 'skip-validate-metainfo-file-test
129 (lambda _
130 (substitute* "data/meson.build"
131 (("if ascli_exe\\.found\\(\\)")
132 "if false"))))
133 (add-after 'glib-or-gtk-wrap 'wrap-paths
134 (lambda* (#:key outputs #:allow-other-keys)
135 (let* ((out (assoc-ref outputs "out"))
136 (bin (string-append out "/bin/"))
137 (lib (string-append out "/lib/python"
138 ,(version-major+minor
139 (package-version python))
140 "/site-packages")))
141 (wrap-program (string-append bin "giara")
142 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH") ,lib))
143 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))))))))
144 (native-inputs
145 (list gettext-minimal
146 (list glib "bin")
147 gobject-introspection
148 (list gtk "bin")
149 pkg-config))
150 (inputs
151 (list bash-minimal
152 blueprint-compiler-0.4
153 glib
154 gtk
155 gtksourceview
156 libadwaita
157 python
158 python-beautifulsoup4
159 python-dateutil
160 python-mistune
161 python-pillow
162 python-praw
163 python-pygobject
164 python-requests))
165 (propagated-inputs
166 (list dconf))
167 (synopsis "Client for Reddit")
168 (description "Giara is a reddit app, built with Python, GTK4 and libadwaita.")
169 (home-page "https://giara.gabmus.org/")
170 (license license:gpl3+)))
171
172(define-public newsboat
173 (package
174 (name "newsboat")
175 (version "2.45")
176 (source
177 (origin
178 (method url-fetch)
179 (uri (string-append "https://newsboat.org/releases/" version
180 "/newsboat-" version ".tar.xz"))
181 (sha256
182 (base32 "0gabwdwpa46ygldk9ahh7x79isahhxg1dac02wjc9wqq4lyk1zny"))))
183 (build-system cargo-build-system)
184 (native-inputs
185 (append
186 (list gettext-minimal
187 openssl
188 pkg-config)
189 ;; For building documentation.
190 (if (supported-package? ruby-asciidoctor/minimal)
191 (list ruby-asciidoctor/minimal)
192 '())))
193 (inputs
194 (cons* curl
195 json-c
196 libxml2
197 ncurses
198 stfl
199 sqlite
200 (cargo-inputs 'newsboat)))
201 (arguments
202 (list
203 #:modules '((guix build cargo-build-system)
204 (guix build utils)
205 ((guix build gnu-build-system) #:prefix gnu:))
206 #:install-source? #f
207 #:phases
208 #~(modify-phases %standard-phases
209 #$@(if (not (this-package-native-input "ruby-asciidoctor"))
210 #~((add-after 'unpack 'dont-use-asciidoctor
211 (lambda _
212 (substitute* "config.sh"
213 ((".*asciidoctor.*") ""))
214 (substitute* "Makefile"
215 (("^doc:.*") "doc:\n")
216 (("install-podboat install-docs") "install-podboat")))))
217 #~())
218 (add-after 'unpack 'pre-build
219 (lambda* (#:key inputs #:allow-other-keys)
220 (setenv "CXX" #$(cxx-for-target))
221 (setenv "CXX_FOR_BUILD" (which "g++"))
222 (substitute* "config.sh"
223 (("if curl-config")
224 (string-append
225 "if " (search-input-file inputs "/bin/curl-config"))))))
226 (add-after 'unpack 'patch-source
227 (lambda* (#:key outputs #:allow-other-keys)
228 (substitute* "Makefile"
229 (("Cargo.lock") "")
230 ;; Replace the prefix in the Makefile.
231 (("/usr/local") (assoc-ref outputs "out")))))
232 (replace 'build
233 (assoc-ref gnu:%standard-phases 'build))
234 (replace 'check
235 (lambda* (#:key tests? #:allow-other-keys #:rest args)
236 (when tests?
237 ((assoc-ref gnu:%standard-phases 'check)
238 #:test-target "test"))))
239 (replace 'install
240 (assoc-ref gnu:%standard-phases 'install)))))
241 (native-search-paths
242 ;; Newsboat respects CURL_CA_BUNDLE.
243 (list (search-path-specification
244 (variable "CURL_CA_BUNDLE")
245 (file-type 'regular)
246 (separator #f) ;single entry
247 (files '("etc/ssl/certs/ca-certificates.crt")))))
248 (home-page "https://newsboat.org/")
249 (synopsis "Text-mode RSS and Atom feed reader with podcast support")
250 (description "Newsboat is a feed reader for @dfn{RSS} and @dfn{Atom}, XML
251formats widely used to transmit, publish, and syndicate news or blog articles.
252It's designed for use on text terminals, and to have a coherent and easy-to-use
253interface that might look familiar to @command{mutt} or @command{slrn} users.
254
255Newsboat supports OPML import/exports, HTML rendering, podcasts (with
256@command{podboat}), off-line reading, searching and storing articles to your
257file system, and many more features.")
258 (properties '((release-monitoring-url . "https://newsboat.org/news.atom")))
259 (license (list license:gpl2+ ; filter/*
260 license:expat)))) ; everything else
261
262(define-public newsraft
263 (package
264 (name "newsraft")
265 (version "0.35")
266 (source
267 (origin
268 (method git-fetch)
269 (uri (git-reference
270 (url "https://codeberg.org/newsraft/newsraft")
271 (commit (string-append name "-" version))))
272 (file-name (git-file-name name version))
273 (sha256
274 (base32 "044p7c39yq1xj9irl22bhgfw48pn6am46wiaa3g01iw6rwz2alkk"))))
275 (build-system gnu-build-system)
276 (arguments
277 (list
278 #:make-flags
279 #~(list (string-append "CC=" #$(cc-for-target))
280 (string-append "PREFIX=" #$output)
281 "CFLAGS=-DCURL_WRITEFUNC_ERROR=0xFFFFFFFF")
282 #:phases
283 #~(modify-phases %standard-phases
284 (delete 'configure) ; no configure
285 (add-after 'install 'install-desktop-entry
286 (lambda _
287 (install-file "doc/newsraft.desktop"
288 (string-append #$output "/share/applications"))))
289 (add-after 'install 'wrap-newsraft
290 (lambda* (#:key inputs outputs #:allow-other-keys)
291 (let ((newsraft (search-input-file outputs "/bin/newsraft"))
292 (libnotify (string-append (assoc-ref inputs "libnotify")
293 "/bin")))
294 (wrap-program newsraft
295 `("PATH" ":" prefix (,libnotify)))))))))
296 (native-inputs
297 (list pkg-config scdoc))
298 (inputs
299 (list curl expat gumbo-parser libnotify ncurses sqlite yajl))
300 (home-page "https://newsraft.codeberg.page/")
301 (synopsis "Feed reader for terminal")
302 (description
303 "Newsraft is a feed reader with ncurses user interface. It is greatly
304inspired by Newsboat and tries to be its lightweight counterpart.
305
306Features:
307@itemize
308@item parallel downloads
309@item section-based feeds grouping
310@item opening links in any program
311@item viewing news from all feeds with explore mode
312@item automatic updates for feeds and sections
313@item per-feed settings and key bindings
314@item assigning multiple actions to key bindings
315@item processing feeds from command output
316@item text searching by news titles and content
317@item interactive news content viewing
318@end itemize")
319 (license license:isc)))
320
321(define-public liferea
322 (package
323 (name "liferea")
324 (version "1.16.5")
325 (source
326 (origin
327 (method git-fetch)
328 (uri (git-reference
329 (url "https://github.com/lwindolf/liferea/")
330 (commit (string-append "v" version))))
331 (file-name (git-file-name name version))
332 (sha256
333 (base32 "1bphjmab2zj0ivydzlr00ds57krfcfaakk02yyxzxr3wsgdi8saf"))))
334 (build-system glib-or-gtk-build-system)
335 (arguments
336 `(#:configure-flags
337 (list
338 "--disable-static")
339 #:phases
340 (modify-phases %standard-phases
341 (add-after 'install 'wrap-gi-python
342 (lambda* (#:key inputs outputs #:allow-other-keys)
343 (let ((out (assoc-ref outputs "out"))
344 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
345 (python-path (getenv "GUIX_PYTHONPATH")))
346 (wrap-program (string-append out "/bin/liferea")
347 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
348 `("GUIX_PYTHONPATH" ":" prefix (,python-path)))))))))
349 (native-inputs
350 (list autoconf
351 automake
352 gettext-minimal
353 `(,glib "bin")
354 gobject-introspection
355 intltool
356 libtool
357 pkg-config
358 which))
359 (inputs
360 (list bash-minimal
361 glib
362 glib-networking
363 gnome-keyring
364 gsettings-desktop-schemas
365 gstreamer
366 json-glib
367 libnotify
368 libpeas-2
369 libsecret
370 libsoup-minimal
371 libxml2
372 libxslt
373 pango
374 python
375 python-pycairo
376 python-pygobject
377 sqlite
378 webkitgtk-for-gtk3))
379 (home-page "https://lzone.de/liferea/")
380 (synopsis "News reader for GTK/GNOME")
381 (description "Liferea is a desktop feed reader/news aggregator that
382brings together all of the content from your favorite subscriptions into
383a simple interface that makes it easy to organize and browse feeds.")
384 (license license:gpl2+)))
385
386(define-public rtv
387 (package
388 (name "rtv")
389 (version "1.27.0")
390 (source
391 (origin
392 (method git-fetch)
393 (uri (git-reference
394 (url "https://github.com/michael-lazar/rtv")
395 (commit (string-append "v" version))))
396 (file-name (git-file-name name version))
397 (sha256
398 (base32 "1hw7xy2kjxq7y3wcibcz4l7zj8icvigialqr17l362xry0y17y5j"))))
399 (build-system pyproject-build-system)
400 (arguments
401 (list
402 #:tests? #f ;tests fail: _curses.error: nocbreak() returned ERR
403 #:phases
404 #~(modify-phases %standard-phases
405 (add-before 'check 'set-environment-variables
406 (lambda* (#:key inputs #:allow-other-keys)
407 (setenv "HOME"
408 (getcwd))
409 (setenv "TERM" "linux")
410 (setenv "TERMINFO"
411 (search-input-directory inputs "share/terminfo"))))
412 ;; Loading this as a library requires a controlling terminal, etc.
413 (delete 'sanity-check))))
414 (propagated-inputs (list python-beautifulsoup4 python-decorator
415 python-requests python-six))
416 (native-inputs (list ncurses python-mock python-pytest python-setuptools))
417 (home-page "https://github.com/michael-lazar/rtv")
418 (synopsis "Terminal viewer for Reddit (Reddit Terminal Viewer)")
419 (description
420 "RTV provides a text-based interface to view and interact with Reddit.")
421 (license (list license:expat license:gpl3+)))) ; rtv/packages/praw
422
423(define-public tuir
424 (package
425 (name "tuir")
426 (version "1.29.0")
427 (source
428 (origin
429 (method url-fetch)
430 (uri (pypi-uri "tuir" version))
431 (sha256
432 (base32 "06xb030ibphbrz4nsxm8mh3g60ld8xfp6kc3j6vi1k4ls5s4h79i"))
433 (patches (search-patches "tuir-python-3.12-support.patch"))))
434 (build-system pyproject-build-system)
435 (arguments
436 (list
437 #:test-flags
438 #~(list "-k" (string-join
439 ;; Some tests require "/etc/ssl/certs/ca-certificates.crt"
440 ;; which is not available during the tests; also likely
441 ;; those tests require networking.
442 (list "not test_content"
443 "test_inbox"
444 "test_mime_parsers"
445 "test_oauth"
446 "test_page"
447 "test_submission"
448 "test_subreddit"
449 "test_subscription")
450 " and not "))
451 #:phases
452 #~(modify-phases %standard-phases
453 (delete 'sanity-check)))) ; Reads environment variables.
454 (inputs
455 (list python-beautifulsoup4
456 python-decorator
457 python-kitchen
458 python-requests
459 python-six))
460 (native-inputs
461 (list python-mock
462 python-pytest
463 python-setuptools
464 python-vcrpy))
465 (home-page "https://gitlab.com/ajak/tuir")
466 (synopsis "Terminal viewer for Reddit (Terminal UI for Reddit)")
467 (description
468 "Tuir provides a simple terminal viewer for Reddit (Terminal UI for Reddit).")
469 (license (list license:expat
470 license:gpl3+)))) ; tuir/packages/praw
471
472(define-public morss
473 (package
474 (name "morss")
475 (version "20221213.2216")
476 (source (origin
477 (method url-fetch)
478 (uri (pypi-uri "morss" version))
479 (sha256
480 (base32
481 "1mvxxhzmraxjnw0vz60zkl4d8xp7lw0fs0z537zfhmj1lj9ap4cp"))))
482 (build-system pyproject-build-system)
483 (arguments
484 ;; Tests are not available in the PyPI release and the Git release
485 ;; is lagging behind. Additionally, tests use the network.
486 (list #:tests? #f
487 ;; Sanity check fails to find the module 'bs4', but it's available
488 ;; in the python-beautifulsoup4 dependency.
489 #:phases #~(modify-phases %standard-phases
490 (delete 'sanity-check))))
491 (native-inputs (list python-setuptools))
492 (propagated-inputs (list python-beautifulsoup4 python-chardet
493 python-dateutil python-lxml))
494 (home-page "https://morss.it/")
495 (synopsis "Get full-text RSS feeds")
496 (description "Morss' goal is to get full-text RSS feeds out of striped
497RSS feeds, commonly available on the internet. It also makes it possible
498to create RSS feeds for websites that don't provide any.")
499 (license license:agpl3+)))
500
501(define-public syndication-domination
502 (let ((revision "1")
503 (commit "75920321062d682437f3fb0319dad227d8b18f6c"))
504 (package
505 (name "syndication-domination")
506 (version (git-version "1.0" revision commit))
507 (source (origin
508 (method git-fetch)
509 (uri (git-reference
510 (url "https://gitlab.com/gabmus/syndication-domination")
511 (commit commit)))
512 (file-name (git-file-name name version))
513 (sha256
514 (base32 "1fl362920n6nz4x9wihyzbr82d9cy60sknhmajj62whd5gs49sbw"))))
515 (build-system meson-build-system)
516 (inputs (list fmt tidy-html pybind11-2 python pugixml))
517 (native-inputs (list cmake-minimal pkg-config)) ; need cmake to find pybind11
518 (home-page "https://gitlab.com/gabmus/syndication-domination")
519 (synopsis "RSS/Atom feed parser")
520 (description "This package provides an experimental RSS/Atom feed
521parser. It is \"not fit for use at this point\", but gfeeds uses it anyway.")
522 (license license:agpl3))))
523
524(define-public gfeeds
525 (package
526 (name "gfeeds")
527 (version "2.2.0")
528 (source (origin
529 (method git-fetch)
530 (uri (git-reference
531 (url "https://gitlab.gnome.org/World/gfeeds")
532 (commit version)))
533 (file-name (git-file-name name version))
534 (sha256
535 (base32
536 "0p2hyjif9yhpc6r3ig7fdxpb2q8s9g42mz38svsc38gq7hb13b2w"))))
537 (build-system meson-build-system)
538 (arguments
539 (list
540 #:phases
541 #~(modify-phases %standard-phases
542 (add-after 'unpack 'patch-mpv-path
543 (lambda* (#:key inputs #:allow-other-keys)
544 (substitute* "gfeeds/confManager.py"
545 (("mpv") (search-input-file inputs "/bin/mpv")))))
546 (add-after 'unpack 'skip-icon-cache
547 (lambda _
548 (substitute* "meson.build"
549 (("gtk_update_icon_cache: true")
550 "gtk_update_icon_cache: false"))))
551 (add-after 'install 'wrap-gfeeds
552 (lambda* (#:key outputs #:allow-other-keys)
553 (wrap-program (search-input-file outputs "/bin/gfeeds")
554 `("PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
555 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
556 `("XDG_DATA_DIRS" ":" prefix (,(getenv "XDG_DATA_DIRS")))))))))
557 (native-inputs
558 (list `(,glib "bin")
559 blueprint-compiler-0.4
560 gobject-introspection
561 gettext-minimal
562 pkg-config))
563 (inputs
564 (list bash-minimal
565 glib
566 gsettings-desktop-schemas
567 gtk
568 hicolor-icon-theme
569 libadwaita
570 mpv
571 python
572 python-beautifulsoup4
573 python-dateutil
574 python-feedparser
575 python-html5lib
576 python-humanize
577 python-listparser
578 python-lxml
579 python-magic
580 python-pillow
581 python-pygments
582 python-pygobject
583 python-pytz
584 python-readability-lxml
585 python-requests
586 syndication-domination
587 webkitgtk))
588 (home-page "https://gfeeds.gabmus.org/")
589 (synopsis "Easy-to-use GTK+ RSS/Atom feed reader")
590 (description "Feeds is an RSS/Atom feed reader made with GTK+
591and it has an easy-to-use graphical user interface.")
592 (license license:gpl3+)))