gnu: perl-email-abstract: Update to 3.009.
[jackhill/guix/guix.git] / gnu / packages / gpodder.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
3 ;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
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 gpodder)
22 #:use-module (guix download)
23 #:use-module (guix git-download)
24 #:use-module (guix packages)
25 #:use-module (guix utils)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix build-system cmake)
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 curl)
35 #:use-module (gnu packages freedesktop)
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gtk)
38 #:use-module (gnu packages groff)
39 #:use-module (gnu packages mp3)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages python-web)
42 #:use-module (gnu packages python-xyz)
43 #:use-module (gnu packages qt)
44 #:use-module (gnu packages video)
45 #:use-module (gnu packages xml))
46
47 (define-public gpodder
48 (package
49 (name "gpodder")
50 (version "3.10.20")
51 (source
52 (origin
53 (method git-fetch)
54 (uri (git-reference
55 (url "https://github.com/gpodder/gpodder")
56 (commit version)))
57 (sha256
58 (base32 "0lwf1lm20q6i8xbbva1g4arbinyxca10865dn19p5kr1b3gvmxqh"))
59 (file-name (git-file-name name version))
60 (patches (search-patches "gpodder-disable-updater.patch"))))
61 (build-system python-build-system)
62 (native-inputs
63 `(("intltool" ,intltool)
64 ("python-coverage" ,python-coverage)
65 ("python-minimock" ,python-minimock)
66 ("python-pytest" ,python-pytest)
67 ("python-pytest-cov" ,python-pytest-cov)
68 ("python-pytest-httpserver" ,python-pytest-httpserver)
69 ("which" ,which)))
70 (inputs
71 `(("gtk+" ,gtk+)
72 ("python-pygobject" ,python-pygobject)
73 ("python-pycairo" ,python-pycairo)
74 ("python-requests" ,python-requests)
75 ("python-dbus" ,python-dbus)
76 ("python-html5lib" ,python-html5lib)
77 ("python-mygpoclient" ,python-mygpoclient)
78 ("python-podcastparser" ,python-podcastparser)
79 ("youtube-dl" ,youtube-dl)
80 ("xdg-utils" ,xdg-utils)))
81 (arguments
82 '(#:phases
83 (modify-phases %standard-phases
84 ;; Avoid needing xdg-utils as a propagated input.
85 (add-after 'unpack 'patch-xdg-open
86 (lambda* (#:key inputs #:allow-other-keys)
87 (let ((xdg-utils (assoc-ref inputs "xdg-utils")))
88 (substitute* "src/gpodder/util.py"
89 (("xdg-open") (string-append xdg-utils "/bin/xdg-open")))
90 #t)))
91 (replace 'check
92 (lambda _
93 ; The `unittest' target overrides the PYTHONPATH variable.
94 (substitute* "makefile"
95 (("PYTHONPATH=src/") "PYTHONPATH=${PYTHONPATH}:src/"))
96 (invoke "make" "unittest")))
97 ;; 'msgmerge' introduces non-determinism by resetting the
98 ;; POT-Creation-Date in .po files.
99 (add-before 'install 'do-not-run-msgmerge
100 (lambda _
101 (substitute* "makefile"
102 (("msgmerge") "true"))
103 #t))
104 (add-before 'install 'make-po-files-writable
105 (lambda _
106 (for-each
107 (lambda (f)
108 (chmod f #o664))
109 (find-files "po"))
110 #t))
111 (replace 'install
112 (lambda* (#:key outputs #:allow-other-keys)
113 (setenv "PREFIX" (assoc-ref outputs "out"))
114 (invoke "make" "install")))
115 (add-after 'install 'wrap-gpodder
116 (lambda* (#:key outputs #:allow-other-keys)
117 (let ((out (assoc-ref outputs "out"))
118 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
119 (wrap-program (string-append out "/bin/gpodder")
120 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
121 #t))))))
122 (home-page "https://gpodder.github.io")
123 (synopsis "Simple podcast client")
124 (description "gPodder is a podcatcher, i.e. an application that allows
125 podcast feeds (RSS, Atom, Youtube, Soundcloud, Vimeo and XSPF) to be
126 subscribed to, checks for new episodes and allows the podcast to be saved
127 locally for later listening.")
128 (license license:gpl3+)))
129
130 (define-public libmygpo-qt
131 (package
132 (name "libmygpo-qt")
133 (version "1.1.0")
134 (source (origin
135 (method url-fetch)
136 (uri (string-append "http://stefan.derkits.at/files/"
137 "libmygpo-qt/libmygpo-qt." version ".tar.gz"))
138 (sha256
139 (base32
140 "1kg18qrq2rsswgzhl65r3mlyx7kpqg4wwnbp4yiv6svvmadmlxl2"))
141 (patches (search-patches "libmygpo-qt-fix-qt-5.11.patch"
142 "libmygpo-qt-missing-qt5-modules.patch"))))
143 (build-system cmake-build-system)
144 (native-inputs
145 `(("pkg-config" ,pkg-config)))
146 (inputs
147 `(("qt" ,qtbase-5)))
148 (arguments
149 `(#:configure-flags '("-DMYGPO_BUILD_TESTS=ON")
150 ;; TODO: Enable tests when https://github.com/gpodder/gpodder/issues/446
151 ;; is fixed.
152 #:tests? #f))
153 (home-page "https://gpodder.github.io")
154 (synopsis "Qt/C++ library wrapping the gpodder web service")
155 (description "@code{libmygpo-qt} is a Qt/C++ library wrapping the
156 @url{https://gpodder.net} APIs. It allows applications to discover, manage
157 and track podcasts.")
158 (license license:lgpl2.1+)))
159
160 (define-public python-mygpoclient
161 (package
162 (name "python-mygpoclient")
163 (version "1.8")
164 (source
165 (origin
166 (method url-fetch)
167 (uri (pypi-uri "mygpoclient" version))
168 (sha256
169 (base32
170 "1fi5x6k1mngr0iviw2s4n1f3y2x7pwqy5ivkcrjdprzvwr37f0mh"))))
171 (build-system python-build-system)
172 (native-inputs
173 `(("python-coverage" ,python-coverage)
174 ("python-minimock" ,python-minimock)
175 ("python-nose" ,python-nose)))
176 (arguments
177 `(#:phases
178 (modify-phases %standard-phases
179 (replace 'check
180 (lambda _
181 (invoke "make" "test"))))))
182 (home-page "https://mygpoclient.readthedocs.io")
183 (synopsis "Python library for the gPodder web service")
184 (description "@code{mygpoclient} provides an easy and structured way to
185 access the @url{https://gpodder.net} web services. In addition to
186 subscription list synchronization and storage, the API supports uploading and
187 downloading episode status changes.")
188 (license license:gpl3+)))
189
190 (define-public python-podcastparser
191 (package
192 (name "python-podcastparser")
193 (version "0.6.6")
194 (source
195 (origin
196 (method url-fetch)
197 (uri (pypi-uri "podcastparser" version))
198 (sha256
199 (base32 "0m24r2qhck0win44xfhxajbppkss4ha6am0042s0xyq3408883m3"))))
200 (native-inputs
201 `(("python-pytest" ,python-pytest)))
202 (arguments
203 '(#:phases
204 (modify-phases %standard-phases
205 (replace 'check
206 (lambda _ (invoke "pytest"))))))
207 (build-system python-build-system)
208 (home-page "http://gpodder.org/podcastparser")
209 (synopsis "Simplified and fast RSS parser Python library")
210 (description "@code{podcastparser} is a library for the gPodder project to
211 provide an easy and reliable way of parsing RSS and Atom-based podcast feeds
212 in Python.")
213 (license license:isc)))
214
215 (define-public castget
216 (package
217 (name "castget")
218 (version "2.0.0")
219 (source
220 (origin
221 (method git-fetch)
222 (uri (git-reference
223 (url "https://github.com/mlj/castget")
224 (commit (string-append "rel_" (string-replace-substring
225 version "." "_")))))
226 (sha256
227 (base32 "1129x64rw587q3sdpa3lrgs0gni5f0siwbvmfz8ya4zkbhgi2ik7"))
228 (file-name (git-file-name name version))))
229 (build-system gnu-build-system)
230 (native-inputs
231 `(("autoconf" ,autoconf)
232 ("automake" ,automake)
233 ("libtool" ,libtool)
234 ("pkg-config" ,pkg-config)
235 ("ronn-ng" ,ronn-ng)))
236 (inputs `(("curl" ,curl)
237 ("glib" ,glib)
238 ("id3lib" ,id3lib)
239 ("libxml2" ,libxml2)))
240 (synopsis "Command line podcast downloader")
241 (description
242 "castget is a simple, command-line based RSS enclosure downloader. It is
243 primarily intended for automatic, unattended downloading of podcasts. It uses
244 libcurl for the download process.")
245 (license license:lgpl2.1+)
246 (home-page "https://castget.johndal.com")))