1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
3 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages gpodder)
21 #:use-module (guix download)
22 #:use-module (guix git-download)
23 #:use-module (guix packages)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix build-system cmake)
26 #:use-module (guix build-system python)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages check)
29 #:use-module (gnu packages freedesktop)
30 #:use-module (gnu packages glib)
31 #:use-module (gnu packages gtk)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages python-web)
34 #:use-module (gnu packages python-xyz)
35 #:use-module (gnu packages qt)
36 #:use-module (gnu packages video))
38 (define-public gpodder
46 (url "https://github.com/gpodder/gpodder")
50 "0pbpaasd7kj6y25nm45y1qyb9sxd4570f7g6zkfcpf6pa3nx7qkq"))
51 (file-name (git-file-name name version))
52 (patches (search-patches "gpodder-disable-updater.patch"))))
53 (build-system python-build-system)
55 `(("intltool" ,intltool)
56 ("python-coverage" ,python-coverage)
57 ("python-minimock" ,python-minimock)))
60 ("python-pygobject" ,python-pygobject)
61 ("python-pycairo" ,python-pycairo)
62 ("python-dbus" ,python-dbus)
63 ("python-html5lib" ,python-html5lib)
64 ("python-mygpoclient" ,python-mygpoclient)
65 ("python-podcastparser" ,python-podcastparser)
66 ("youtube-dl" ,youtube-dl)
67 ("xdg-utils" ,xdg-utils)))
70 (modify-phases %standard-phases
71 ;; Avoid needing xdg-utils as a propagated input.
72 (add-after 'unpack 'patch-xdg-open
73 (lambda* (#:key inputs #:allow-other-keys)
74 (let ((xdg-utils (assoc-ref inputs "xdg-utils")))
75 (substitute* "src/gpodder/util.py"
76 (("xdg-open") (string-append xdg-utils "/bin/xdg-open")))
80 ; The `unittest' target overrides the PYTHONPATH variable.
81 (substitute* "makefile"
82 (("PYTHONPATH=src/") "PYTHONPATH=${PYTHONPATH}:src/"))
83 (invoke "make" "unittest")))
84 ;; 'msgmerge' introduces non-determinism by resetting the
85 ;; POT-Creation-Date in .po files.
86 (add-before 'install 'do-not-run-msgmerge
88 (substitute* "makefile"
89 (("msgmerge") "true"))
91 (add-before 'install 'make-po-files-writable
99 (lambda* (#:key outputs #:allow-other-keys)
100 (setenv "PREFIX" (assoc-ref outputs "out"))
101 (invoke "make" "install")))
102 (add-after 'install 'wrap-gpodder
103 (lambda* (#:key outputs #:allow-other-keys)
104 (let ((out (assoc-ref outputs "out"))
105 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
106 (wrap-program (string-append out "/bin/gpodder")
107 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
109 (home-page "https://gpodder.github.io")
110 (synopsis "Simple podcast client")
111 (description "gPodder is a podcatcher, i.e. an application that allows
112 podcast feeds (RSS, Atom, Youtube, Soundcloud, Vimeo and XSPF) to be
113 subscribed to, checks for new episodes and allows the podcast to be saved
114 locally for later listening.")
115 (license license:gpl3+)))
117 (define-public libmygpo-qt
123 (uri (string-append "http://stefan.derkits.at/files/"
124 "libmygpo-qt/libmygpo-qt." version ".tar.gz"))
127 "1kg18qrq2rsswgzhl65r3mlyx7kpqg4wwnbp4yiv6svvmadmlxl2"))
128 (patches (search-patches "libmygpo-qt-fix-qt-5.11.patch"
129 "libmygpo-qt-missing-qt5-modules.patch"))))
130 (build-system cmake-build-system)
132 `(("pkg-config" ,pkg-config)))
136 `(#:configure-flags '("-DMYGPO_BUILD_TESTS=ON")
137 ;; TODO: Enable tests when https://github.com/gpodder/gpodder/issues/446
140 (home-page "https://gpodder.github.io")
141 (synopsis "Qt/C++ library wrapping the gpodder web service")
142 (description "@code{libmygpo-qt} is a Qt/C++ library wrapping the
143 @url{https://gpodder.net} APIs. It allows applications to discover, manage
144 and track podcasts.")
145 (license license:lgpl2.1+)))
147 (define-public python-mygpoclient
149 (name "python-mygpoclient")
154 (uri (pypi-uri "mygpoclient" version))
157 "1fi5x6k1mngr0iviw2s4n1f3y2x7pwqy5ivkcrjdprzvwr37f0mh"))))
158 (build-system python-build-system)
160 `(("python-coverage" ,python-coverage)
161 ("python-minimock" ,python-minimock)
162 ("python-nose" ,python-nose)))
165 (modify-phases %standard-phases
168 (invoke "make" "test"))))))
169 (home-page "https://mygpoclient.readthedocs.io")
170 (synopsis "Python library for the gPodder web service")
171 (description "@code{mygpoclient} provides an easy and structured way to
172 access the @url{https://gpodder.net} web services. In addition to
173 subscription list synchronization and storage, the API supports uploading and
174 downloading episode status changes.")
175 (license license:gpl3+)))
177 (define-public python-podcastparser
179 (name "python-podcastparser")
184 (uri (pypi-uri "podcastparser" version))
186 (base32 "0k62ppg20i41gcc5x8ddjn7zbpy47hqpxzrq9257g2c71m4qw07b"))))
188 `(("python-coverage" ,python-coverage)
189 ("python-nose" ,python-nose)))
192 (modify-phases %standard-phases
194 (lambda _ (invoke "nosetests"))))))
195 (build-system python-build-system)
196 (home-page "http://gpodder.org/podcastparser")
197 (synopsis "Simplified and fast RSS parser Python library")
198 (description "@code{podcastparser} is a library for the gPodder project to
199 provide an easy and reliable way of parsing RSS and Atom-based podcast feeds
201 (license license:isc)))