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>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
47 (define-public gpodder
55 (url "https://github.com/gpodder/gpodder")
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)
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)
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)))
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")))
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
101 (substitute* "makefile"
102 (("msgmerge") "true"))
104 (add-before 'install 'make-po-files-writable
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)))
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+)))
130 (define-public libmygpo-qt
136 (uri (string-append "http://stefan.derkits.at/files/"
137 "libmygpo-qt/libmygpo-qt." version ".tar.gz"))
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)
145 `(("pkg-config" ,pkg-config)))
149 `(#:configure-flags '("-DMYGPO_BUILD_TESTS=ON")
150 ;; TODO: Enable tests when https://github.com/gpodder/gpodder/issues/446
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+)))
160 (define-public python-mygpoclient
162 (name "python-mygpoclient")
167 (uri (pypi-uri "mygpoclient" version))
170 "1fi5x6k1mngr0iviw2s4n1f3y2x7pwqy5ivkcrjdprzvwr37f0mh"))))
171 (build-system python-build-system)
173 `(("python-coverage" ,python-coverage)
174 ("python-minimock" ,python-minimock)
175 ("python-nose" ,python-nose)))
178 (modify-phases %standard-phases
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+)))
190 (define-public python-podcastparser
192 (name "python-podcastparser")
197 (uri (pypi-uri "podcastparser" version))
199 (base32 "0m24r2qhck0win44xfhxajbppkss4ha6am0042s0xyq3408883m3"))))
201 `(("python-pytest" ,python-pytest)))
204 (modify-phases %standard-phases
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
213 (license license:isc)))
215 (define-public castget
223 (url "https://github.com/mlj/castget")
224 (commit (string-append "rel_" (string-replace-substring
227 (base32 "1129x64rw587q3sdpa3lrgs0gni5f0siwbvmfz8ya4zkbhgi2ik7"))
228 (file-name (git-file-name name version))))
229 (build-system gnu-build-system)
231 `(("autoconf" ,autoconf)
232 ("automake" ,automake)
234 ("pkg-config" ,pkg-config)
235 ("ronn-ng" ,ronn-ng)))
236 (inputs `(("curl" ,curl)
239 ("libxml2" ,libxml2)))
240 (synopsis "Command line podcast downloader")
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")))