gnu: Add m4rie.
[jackhill/guix/guix.git] / gnu / packages / gpodder.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages gpodder)
20 #:use-module (guix download)
21 #:use-module (guix git-download)
22 #:use-module (guix packages)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix build-system cmake)
25 #:use-module (guix build-system python)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages check)
28 #:use-module (gnu packages freedesktop)
29 #:use-module (gnu packages glib)
30 #:use-module (gnu packages gtk)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages python-web)
33 #:use-module (gnu packages python-xyz)
34 #:use-module (gnu packages qt))
35
36 (define-public gpodder
37 (package
38 (name "gpodder")
39 (version "3.10.9")
40 (source
41 (origin
42 (method git-fetch)
43 (uri (git-reference
44 (url "https://github.com/gpodder/gpodder.git")
45 (commit version)))
46 (sha256
47 (base32
48 "1sdmr1sq1d4p492zp9kq3npl7p56yr0pr470z9r6xxcylax5mhfq"))
49 (file-name (git-file-name name version))))
50 (build-system python-build-system)
51 (native-inputs
52 `(("intltool" ,intltool)))
53 (inputs
54 `(("gtk+" ,gtk+)
55 ("python-pygobject" ,python-pygobject)
56 ("python-pycairo" ,python-pycairo)
57 ("python-dbus" ,python-dbus)
58 ("python-html5lib" ,python-html5lib)
59 ("python-mygpoclient" ,python-mygpoclient)
60 ("python-podcastparser" ,python-podcastparser)
61 ("xdg-utils" ,xdg-utils)))
62 (arguments
63 '(#:phases
64 (modify-phases %standard-phases
65 ;; Avoid needing xdg-utils as a propagated input.
66 (add-after 'unpack 'patch-xdg-open
67 (lambda* (#:key inputs #:allow-other-keys)
68 (let ((xdg-utils (assoc-ref inputs "xdg-utils")))
69 (substitute* "src/gpodder/util.py"
70 (("xdg-open") (string-append xdg-utils "/bin/xdg-open")))
71 #t)))
72 ;; 'msgmerge' introduces non-determinism by resetting the
73 ;; POT-Creation-Date in .po files.
74 (add-before 'install 'do-not-run-msgmerge
75 (lambda _
76 (substitute* "makefile"
77 (("msgmerge") "true"))
78 #t))
79 (add-before 'install 'make-po-files-writable
80 (lambda _
81 (for-each
82 (lambda (f)
83 (chmod f #o664))
84 (find-files "po"))
85 #t))
86 (replace 'install
87 (lambda* (#:key outputs #:allow-other-keys)
88 (setenv "PREFIX" (assoc-ref outputs "out"))
89 (invoke "make" "install")))
90 (add-after 'install 'wrap-gpodder
91 (lambda* (#:key outputs #:allow-other-keys)
92 (let ((out (assoc-ref outputs "out"))
93 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
94 (wrap-program (string-append out "/bin/gpodder")
95 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
96 #t))))))
97 (home-page "https://gpodder.github.io")
98 (synopsis "Simple podcast client")
99 (description "gPodder is a podcatcher, i.e. an application that allows
100 podcast feeds (RSS, Atom, Youtube, Soundcloud, Vimeo and XSPF) to be
101 subscribed to, checks for new episodes and allows the podcast to be saved
102 locally for later listening.")
103 (license license:gpl3+)))
104
105 (define-public libmygpo-qt
106 (package
107 (name "libmygpo-qt")
108 (version "1.1.0")
109 (source (origin
110 (method url-fetch)
111 (uri (string-append "http://stefan.derkits.at/files/"
112 "libmygpo-qt/libmygpo-qt." version ".tar.gz"))
113 (sha256
114 (base32
115 "1kg18qrq2rsswgzhl65r3mlyx7kpqg4wwnbp4yiv6svvmadmlxl2"))
116 (patches (search-patches "libmygpo-qt-fix-qt-5.11.patch"
117 "libmygpo-qt-missing-qt5-modules.patch"))))
118 (build-system cmake-build-system)
119 (native-inputs
120 `(("pkg-config" ,pkg-config)))
121 (inputs
122 `(("qt" ,qtbase)))
123 (arguments
124 `(#:configure-flags '("-DMYGPO_BUILD_TESTS=ON")
125 ;; TODO: Enable tests when https://github.com/gpodder/gpodder/issues/446
126 ;; is fixed.
127 #:tests? #f))
128 (home-page "http://wiki.gpodder.org/wiki/Libmygpo-qt")
129 (synopsis "Qt/C++ library wrapping the gpodder web service")
130 (description "@code{libmygpo-qt} is a Qt/C++ library wrapping the
131 @url{https://gpodder.net} APIs. It allows applications to discover, manage
132 and track podcasts.")
133 (license license:lgpl2.1+)))
134
135 (define-public python-mygpoclient
136 (package
137 (name "python-mygpoclient")
138 (version "1.8")
139 (source
140 (origin
141 (method url-fetch)
142 (uri (pypi-uri "mygpoclient" version))
143 (sha256
144 (base32
145 "1fi5x6k1mngr0iviw2s4n1f3y2x7pwqy5ivkcrjdprzvwr37f0mh"))))
146 (build-system python-build-system)
147 (native-inputs
148 `(("python-coverage" ,python-coverage)
149 ("python-minimock" ,python-minimock)
150 ("python-nose" ,python-nose)))
151 (arguments
152 `(#:phases
153 (modify-phases %standard-phases
154 (replace 'check
155 (lambda _
156 (invoke "make" "test"))))))
157 (home-page "https://mygpoclient.readthedocs.io")
158 (synopsis "Python library for the gPodder web service")
159 (description "@code{mygpoclient} provides an easy and structured way to
160 access the @url{https://gpodder.net} web services. In addition to
161 subscription list synchronization and storage, the API supports uploading and
162 downloading episode status changes.")
163 (license license:gpl3+)))
164
165 (define-public python-podcastparser
166 (package
167 (name "python-podcastparser")
168 (version "0.6.4")
169 (source
170 (origin
171 (method url-fetch)
172 (uri (pypi-uri "podcastparser" version))
173 (sha256
174 (base32
175 "1ksj1gcmbnm5i43xhpqxbs2mqi6xzawwwkwbh9h6lwa1wxxvv247"))))
176 (native-inputs
177 `(("python-nose" ,python-nose)))
178 (build-system python-build-system)
179 (home-page "http://gpodder.org/podcastparser")
180 (synopsis "Simplified and fast RSS parser Python library")
181 (description "@code{podcastparser} is a library for the gPodder project to
182 provide an easy and reliable way of parsing RSS and Atom-based podcast feeds
183 in Python.")
184 (license license:isc)))