mpd.scm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014, 2015 David Thompson <dthompson2@worcester.edu>
  3. ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
  4. ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
  5. ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
  6. ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
  7. ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
  8. ;;;
  9. ;;; This file is part of GNU Guix.
  10. ;;;
  11. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  12. ;;; under the terms of the GNU General Public License as published by
  13. ;;; the Free Software Foundation; either version 3 of the License, or (at
  14. ;;; your option) any later version.
  15. ;;;
  16. ;;; GNU Guix is distributed in the hope that it will be useful, but
  17. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  18. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. ;;; GNU General Public License for more details.
  20. ;;;
  21. ;;; You should have received a copy of the GNU General Public License
  22. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  23. (define-module (gnu packages mpd)
  24. #:use-module (gnu packages)
  25. #:use-module ((guix licenses) #:prefix license:)
  26. #:use-module (guix packages)
  27. #:use-module (guix download)
  28. #:use-module (guix utils)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (guix build-system python)
  31. #:use-module (gnu packages avahi)
  32. #:use-module (gnu packages boost)
  33. #:use-module (gnu packages gcc) ; GCC@5 for MPD >= 0.20
  34. #:use-module (gnu packages gettext)
  35. #:use-module (gnu packages gnome)
  36. #:use-module (gnu packages gtk)
  37. #:use-module (gnu packages icu4c)
  38. #:use-module (gnu packages readline)
  39. #:use-module (gnu packages compression)
  40. #:use-module (gnu packages curl)
  41. #:use-module (gnu packages documentation)
  42. #:use-module (gnu packages glib)
  43. #:use-module (gnu packages linux)
  44. #:use-module (gnu packages mp3)
  45. #:use-module (gnu packages ncurses)
  46. #:use-module (gnu packages pkg-config)
  47. #:use-module (gnu packages python)
  48. #:use-module (gnu packages pulseaudio)
  49. #:use-module (gnu packages databases)
  50. #:use-module (gnu packages video)
  51. #:use-module (gnu packages xiph))
  52. (define-public libmpdclient
  53. (package
  54. (name "libmpdclient")
  55. (version "2.11")
  56. (source (origin
  57. (method url-fetch)
  58. (uri
  59. (string-append "http://musicpd.org/download/libmpdclient/"
  60. (car (string-split version #\.))
  61. "/libmpdclient-" version ".tar.xz"))
  62. (sha256
  63. (base32
  64. "1xms8q44g6zc7sc212qpcihq6ch3pmph3i1m9hzymmy0jcw6kzhm"))))
  65. (build-system gnu-build-system)
  66. (native-inputs `(("doxygen" ,doxygen)))
  67. (synopsis "Music Player Daemon client library")
  68. (description "A stable, documented, asynchronous API library for
  69. interfacing MPD in the C, C++ & Objective C languages.")
  70. (home-page "http://www.musicpd.org/libs/libmpdclient/")
  71. (license license:bsd-3)))
  72. (define-public mpd
  73. (package
  74. (name "mpd")
  75. (version "0.20.10")
  76. (source (origin
  77. (method url-fetch)
  78. (uri
  79. (string-append "http://musicpd.org/download/mpd/"
  80. (version-major+minor version)
  81. "/mpd-" version ".tar.xz"))
  82. (sha256
  83. (base32
  84. "089i9lh3fa8bix6v0sq0jgs7rkpk8l6q5lmdk6lip96vbh9c3ysj"))))
  85. (build-system gnu-build-system)
  86. (arguments
  87. `(#:phases
  88. (modify-phases %standard-phases
  89. (add-after 'install 'install-service-files
  90. (lambda* (#:key outputs #:allow-other-keys)
  91. (let* ((out (assoc-ref outputs "out"))
  92. (systemd (string-append out "/etc/systemd/system"))
  93. (systemd-user (string-append out "/etc/systemd/user")))
  94. (install-file "systemd/system/mpd.service" systemd)
  95. (install-file "systemd/user/mpd.service" systemd-user)
  96. #t))))))
  97. (inputs `(("ao" ,ao)
  98. ("alsa-lib" ,alsa-lib)
  99. ("avahi" ,avahi)
  100. ("boost" ,boost)
  101. ("curl" ,curl)
  102. ("ffmpeg" ,ffmpeg)
  103. ("flac" ,flac)
  104. ("glib" ,glib)
  105. ("icu4c" ,icu4c)
  106. ("lame" ,lame)
  107. ("libid3tag" ,libid3tag)
  108. ("libmad" ,libmad)
  109. ("libmpdclient" ,libmpdclient)
  110. ("libsamplerate" ,libsamplerate)
  111. ("libsndfile" ,libsndfile)
  112. ("libvorbis" ,libvorbis)
  113. ("opus" ,opus)
  114. ("pulseaudio" ,pulseaudio)
  115. ("sqlite" ,sqlite)
  116. ("zlib" ,zlib)))
  117. (native-inputs `(("pkg-config" ,pkg-config)))
  118. ;; Missing optional inputs:
  119. ;; libyajl
  120. ;; libcdio_paranoia
  121. ;; libmms
  122. ;; libadplug
  123. ;; libaudiofile
  124. ;; faad2
  125. ;; fluidsynth
  126. ;; libgme
  127. ;; libshout
  128. ;; libmpg123
  129. ;; libmodplug
  130. ;; libmpcdec
  131. ;; libsidplay2
  132. ;; libwavpack
  133. ;; libwildmidi
  134. ;; libtwolame
  135. ;; libroar
  136. ;; libjack
  137. ;; OpenAL
  138. (synopsis "Music Player Daemon")
  139. (description "Music Player Daemon (MPD) is a flexible, powerful,
  140. server-side application for playing music. Through plugins and libraries it
  141. can play a variety of sound files while being controlled by its network
  142. protocol.")
  143. (home-page "http://www.musicpd.org/")
  144. (license license:gpl2)))
  145. (define-public mpd-mpc
  146. (package
  147. (name "mpd-mpc")
  148. (version "0.28")
  149. (source (origin
  150. (method url-fetch)
  151. (uri
  152. (string-append "http://www.musicpd.org/download/mpc/"
  153. (car (string-split version #\.))
  154. "/mpc-" version ".tar.xz"))
  155. (sha256
  156. (base32
  157. "0iy5mdffkk61255f62si7p8mhyhkib70zlr1i1iimj2xr037scx4"))))
  158. (build-system gnu-build-system)
  159. (inputs `(("libmpdclient" ,libmpdclient)))
  160. (native-inputs `(("pkg-config" ,pkg-config)))
  161. (synopsis "Music Player Daemon client")
  162. (description "MPC is a minimalist command line interface to MPD, the music
  163. player daemon.")
  164. (home-page "http://www.musicpd.org/clients/mpc/")
  165. (license license:gpl2)))
  166. (define-public ncmpc
  167. (package
  168. (name "ncmpc")
  169. (version "0.27")
  170. (source (origin
  171. (method url-fetch)
  172. (uri
  173. (string-append "http://musicpd.org/download/ncmpc/"
  174. (car (string-split version #\.))
  175. "/ncmpc-" version ".tar.xz"))
  176. (sha256
  177. (base32
  178. "1n8m7syhpgx24hfipixv66h2izn229jkxsmh2q5dzkv9r0znm8pr"))))
  179. (build-system gnu-build-system)
  180. (inputs `(("glib" ,glib)
  181. ("libmpdclient" ,libmpdclient)
  182. ("ncurses" ,ncurses)))
  183. (native-inputs `(("pkg-config" ,pkg-config)))
  184. (synopsis "Curses Music Player Daemon client")
  185. (description "ncmpc is a fully featured MPD client, which runs in a
  186. terminal using ncurses.")
  187. (home-page "http://www.musicpd.org/clients/ncmpc/")
  188. (license license:gpl2)))
  189. (define-public ncmpcpp
  190. (package
  191. (name "ncmpcpp")
  192. (version "0.8")
  193. (source (origin
  194. (method url-fetch)
  195. (uri
  196. (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
  197. version ".tar.bz2"))
  198. (sha256
  199. (base32
  200. "0nj6ky805a55acj0w57sbn3vfmmkbqp97rhbi0q9848n10f2l3rg"))))
  201. (build-system gnu-build-system)
  202. (inputs `(("libmpdclient" ,libmpdclient)
  203. ("boost" ,boost)
  204. ("readline" ,readline)
  205. ("ncurses" ,ncurses)
  206. ("taglib" ,taglib)
  207. ("icu4c" ,icu4c)
  208. ("curl" ,curl)))
  209. (native-inputs
  210. `(("pkg-config" ,pkg-config)))
  211. (arguments
  212. '(#:configure-flags
  213. '("BOOST_LIB_SUFFIX=" "--with-taglib")))
  214. (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
  215. (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
  216. but it provides new useful features such as support for regular expressions
  217. for library searches, extended song format, items filtering, the ability to
  218. sort playlists, and a local file system browser.")
  219. (home-page "https://ncmpcpp.rybczak.net/")
  220. (license license:gpl2+)))
  221. (define-public mpdscribble
  222. (package
  223. (name "mpdscribble")
  224. (version "0.22")
  225. (source (origin
  226. (method url-fetch)
  227. (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
  228. version "/mpdscribble-" version ".tar.gz"))
  229. (sha256
  230. (base32
  231. "0f0ybx380x2z2g1qvdndpvcrhkrgsfqckhz3ryydq2w3pl12v27z"))))
  232. (build-system gnu-build-system)
  233. (inputs `(("libmpdclient" ,libmpdclient)
  234. ("curl" ,curl)
  235. ("glib" ,glib)))
  236. (native-inputs `(("pkg-config" ,pkg-config)))
  237. (synopsis "MPD client for track scrobbling")
  238. (description "mpdscribble is a Music Player Daemon client which submits
  239. information about tracks being played to a scrobbler, such as Libre.FM.")
  240. ;; musicpd.org doesn't mention mpdscribble. It points users to this wiki
  241. ;; instead.
  242. (home-page "http://mpd.wikia.com/wiki/Client:Mpdscribble")
  243. (license license:gpl2+)))
  244. (define-public python-mpd2
  245. (package
  246. (name "python-mpd2")
  247. (version "0.5.5")
  248. (source (origin
  249. (method url-fetch)
  250. (uri (pypi-uri "python-mpd2" version))
  251. (sha256
  252. (base32
  253. "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
  254. (build-system python-build-system)
  255. (arguments
  256. '(#:phases
  257. (modify-phases %standard-phases
  258. (replace 'check
  259. (lambda _ (zero? (system* "python" "mpd_test.py")))))))
  260. (native-inputs `(("python-mock" ,python-mock)))
  261. (home-page "https://github.com/Mic92/python-mpd2")
  262. (synopsis "Python MPD client library")
  263. (description "Python-mpd2 is a Python library which provides a client
  264. interface for the Music Player Daemon.")
  265. (license license:lgpl3+)))
  266. (define-public python2-mpd2
  267. (package-with-python2 python-mpd2))
  268. (define-public sonata
  269. (package
  270. (name "sonata")
  271. (version "1.7b1")
  272. (source (origin
  273. (method url-fetch)
  274. (uri
  275. (string-append "https://github.com/multani/sonata/archive/v"
  276. version ".tar.gz"))
  277. (file-name (string-append name "-" version ".tar.gz"))
  278. (sha256
  279. (base32
  280. "07gq2nxqwxs0qyxjbay7k5j25zd386bn7wdr2dl1gk53diwnn7s0"))))
  281. (build-system python-build-system)
  282. (arguments
  283. `(#:modules ((guix build gnu-build-system)
  284. (guix build python-build-system)
  285. ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
  286. (guix build utils))
  287. #:imported-modules (,@%gnu-build-system-modules
  288. (guix build python-build-system)
  289. (guix build glib-or-gtk-build-system))
  290. #:phases
  291. (modify-phases %standard-phases
  292. (add-after 'install 'glib-or-gtk-wrap
  293. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
  294. (add-after 'install 'wrap-sonata
  295. (lambda* (#:key outputs #:allow-other-keys)
  296. (let ((out (assoc-ref outputs "out"))
  297. (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
  298. (wrap-program (string-append out "/bin/sonata")
  299. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
  300. #t)))))
  301. (native-inputs
  302. `(("gettext" ,gettext-minimal)))
  303. (inputs
  304. `(("python-mpd2" ,python-mpd2)
  305. ("gtk+" ,gtk+)
  306. ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
  307. ("gobject-introspection" ,gobject-introspection)
  308. ("adwaita-icon-theme" ,adwaita-icon-theme)
  309. ("python-pygobject" ,python-pygobject)))
  310. (synopsis "Elegant client for the Music Player Daemon")
  311. (description "Sonata is an elegant graphical client for the Music Player
  312. Daemon (MPD). It supports playlists, multiple profiles (connecting to different
  313. MPD servers, search and multimedia key support.")
  314. (home-page "http://www.nongnu.org/sonata/")
  315. (license license:gpl3+)))