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