gpodder.scm 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  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.
  12. ;;;
  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.
  17. ;;;
  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/>.
  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 utils)
  25. #:use-module ((guix licenses) #:prefix license:)
  26. #:use-module (guix build-system cmake)
  27. #:use-module (guix build-system gnu)
  28. #:use-module (guix build-system python)
  29. #:use-module (gnu packages)
  30. #:use-module (gnu packages autotools)
  31. #:use-module (gnu packages base)
  32. #:use-module (gnu packages bash)
  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 music)
  41. #:use-module (gnu packages pkg-config)
  42. #:use-module (gnu packages python-web)
  43. #:use-module (gnu packages python-xyz)
  44. #:use-module (gnu packages qt)
  45. #:use-module (gnu packages video)
  46. #:use-module (gnu packages xml))
  47. (define-public gpodder
  48. (package
  49. (name "gpodder")
  50. (version "3.10.21")
  51. (source
  52. (origin
  53. (method git-fetch)
  54. (uri (git-reference
  55. (url "https://github.com/gpodder/gpodder")
  56. (commit version)))
  57. (sha256
  58. (base32 "0n73jm5ypsj962gpr0dk10lqh83giqsczm63wchyhmrkyf1wgga1"))
  59. (file-name (git-file-name name version))
  60. (patches (search-patches "gpodder-disable-updater.patch"))))
  61. (build-system python-build-system)
  62. (native-inputs
  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)
  69. ("which" ,which)))
  70. (inputs
  71. `(("bash-minimal" ,bash-minimal)
  72. ("gtk+" ,gtk+)
  73. ("python-pygobject" ,python-pygobject)
  74. ("python-pycairo" ,python-pycairo)
  75. ("python-requests" ,python-requests)
  76. ("python-dbus" ,python-dbus)
  77. ("python-html5lib" ,python-html5lib)
  78. ("python-mutagen" ,python-mutagen)
  79. ("python-mygpoclient" ,python-mygpoclient)
  80. ("python-podcastparser" ,python-podcastparser)
  81. ("youtube-dl" ,youtube-dl)
  82. ("xdg-utils" ,xdg-utils)))
  83. (arguments
  84. '(#:phases
  85. (modify-phases %standard-phases
  86. ;; Avoid needing xdg-utils as a propagated input.
  87. (add-after 'unpack 'patch-xdg-open
  88. (lambda* (#:key inputs #:allow-other-keys)
  89. (let ((xdg-utils (assoc-ref inputs "xdg-utils")))
  90. (substitute* "src/gpodder/util.py"
  91. (("xdg-open") (string-append xdg-utils "/bin/xdg-open")))
  92. #t)))
  93. (replace 'check
  94. (lambda* (#:key tests? #:allow-other-keys)
  95. (when tests?
  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
  100. (lambda _
  101. (substitute* "makefile"
  102. (("msgmerge") "true"))
  103. #t))
  104. (add-before 'install 'make-po-files-writable
  105. (lambda _
  106. (for-each
  107. (lambda (f)
  108. (chmod f #o664))
  109. (find-files "po"))
  110. #t))
  111. (replace 'install
  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)))
  121. #t))))))
  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+)))
  129. (define-public libmygpo-qt
  130. (package
  131. (name "libmygpo-qt")
  132. (version "1.1.0")
  133. (source (origin
  134. (method url-fetch)
  135. (uri (string-append "http://stefan.derkits.at/files/"
  136. "libmygpo-qt/libmygpo-qt." version ".tar.gz"))
  137. (sha256
  138. (base32
  139. "1kg18qrq2rsswgzhl65r3mlyx7kpqg4wwnbp4yiv6svvmadmlxl2"))
  140. (patches (search-patches "libmygpo-qt-fix-qt-5.11.patch"
  141. "libmygpo-qt-missing-qt5-modules.patch"))))
  142. (build-system cmake-build-system)
  143. (native-inputs
  144. `(("pkg-config" ,pkg-config)))
  145. (inputs
  146. `(("qt" ,qtbase-5)))
  147. (arguments
  148. `(#:configure-flags '("-DMYGPO_BUILD_TESTS=ON")
  149. ;; TODO: Enable tests when https://github.com/gpodder/gpodder/issues/446
  150. ;; is fixed.
  151. #:tests? #f))
  152. (home-page "https://gpodder.github.io")
  153. (synopsis "Qt/C++ library wrapping the gpodder web service")
  154. (description "@code{libmygpo-qt} is a Qt/C++ library wrapping the
  155. @url{https://gpodder.net} APIs. It allows applications to discover, manage
  156. and track podcasts.")
  157. (license license:lgpl2.1+)))
  158. (define-public python-mygpoclient
  159. (package
  160. (name "python-mygpoclient")
  161. (version "1.8")
  162. (source
  163. (origin
  164. (method url-fetch)
  165. (uri (pypi-uri "mygpoclient" version))
  166. (sha256
  167. (base32
  168. "1fi5x6k1mngr0iviw2s4n1f3y2x7pwqy5ivkcrjdprzvwr37f0mh"))))
  169. (build-system python-build-system)
  170. (native-inputs
  171. `(("python-coverage" ,python-coverage)
  172. ("python-minimock" ,python-minimock)
  173. ("python-nose" ,python-nose)))
  174. (arguments
  175. `(#:phases
  176. (modify-phases %standard-phases
  177. (replace 'check
  178. (lambda _
  179. (invoke "make" "test"))))))
  180. (home-page "https://mygpoclient.readthedocs.io")
  181. (synopsis "Python library for the gPodder web service")
  182. (description "@code{mygpoclient} provides an easy and structured way to
  183. access the @url{https://gpodder.net} web services. In addition to
  184. subscription list synchronization and storage, the API supports uploading and
  185. downloading episode status changes.")
  186. (license license:gpl3+)))
  187. (define-public python-podcastparser
  188. (package
  189. (name "python-podcastparser")
  190. (version "0.6.6")
  191. (source
  192. (origin
  193. (method url-fetch)
  194. (uri (pypi-uri "podcastparser" version))
  195. (sha256
  196. (base32 "0m24r2qhck0win44xfhxajbppkss4ha6am0042s0xyq3408883m3"))))
  197. (native-inputs
  198. `(("python-pytest" ,python-pytest)))
  199. (arguments
  200. '(#:phases
  201. (modify-phases %standard-phases
  202. (replace 'check
  203. (lambda _ (invoke "pytest"))))))
  204. (build-system python-build-system)
  205. (home-page "http://gpodder.org/podcastparser")
  206. (synopsis "Simplified and fast RSS parser Python library")
  207. (description "@code{podcastparser} is a library for the gPodder project to
  208. provide an easy and reliable way of parsing RSS and Atom-based podcast feeds
  209. in Python.")
  210. (license license:isc)))
  211. (define-public castget
  212. (package
  213. (name "castget")
  214. (version "2.0.0")
  215. (source
  216. (origin
  217. (method git-fetch)
  218. (uri (git-reference
  219. (url "https://github.com/mlj/castget")
  220. (commit (string-append "rel_" (string-replace-substring
  221. version "." "_")))))
  222. (sha256
  223. (base32 "1129x64rw587q3sdpa3lrgs0gni5f0siwbvmfz8ya4zkbhgi2ik7"))
  224. (file-name (git-file-name name version))))
  225. (build-system gnu-build-system)
  226. (native-inputs
  227. `(("autoconf" ,autoconf)
  228. ("automake" ,automake)
  229. ("libtool" ,libtool)
  230. ("pkg-config" ,pkg-config)
  231. ("ronn-ng" ,ronn-ng)))
  232. (inputs `(("curl" ,curl)
  233. ("glib" ,glib)
  234. ("id3lib" ,id3lib)
  235. ("libxml2" ,libxml2)))
  236. (synopsis "Command line podcast downloader")
  237. (description
  238. "castget is a simple, command-line based RSS enclosure downloader. It is
  239. primarily intended for automatic, unattended downloading of podcasts. It uses
  240. libcurl for the download process.")
  241. (license license:lgpl2.1+)
  242. (home-page "https://castget.johndal.com")))