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