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