gnu: mpd: Update to 0.22.2.
[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, 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2019 Evan Straw <evan.straw99@gmail.com>
10 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2020 Lars-Dominik Braun <lars@6xq.net>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages mpd)
29 #:use-module (gnu packages)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix utils)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system meson)
37 #:use-module (guix build-system python)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages avahi)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages gettext)
43 #:use-module (gnu packages gnome)
44 #:use-module (gnu packages gnupg)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages icu4c)
47 #:use-module (gnu packages readline)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages curl)
51 #:use-module (gnu packages documentation)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages mp3)
55 #:use-module (gnu packages ncurses)
56 #:use-module (gnu packages pcre)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages python-xyz)
60 #:use-module (gnu packages pulseaudio)
61 #:use-module (gnu packages sphinx)
62 #:use-module (gnu packages sqlite)
63 #:use-module (gnu packages video)
64 #:use-module (gnu packages xiph))
65
66 (define-public libmpdclient
67 (package
68 (name "libmpdclient")
69 (version "2.19")
70 (source (origin
71 (method url-fetch)
72 (uri
73 (string-append "https://musicpd.org/download/libmpdclient/"
74 (car (string-split version #\.))
75 "/libmpdclient-" version ".tar.xz"))
76 (sha256
77 (base32
78 "12d1fzlkcnjw4ayk2wp11vhglfcvr5k02arzdbkhiavq496av2hm"))))
79 (build-system meson-build-system)
80 (native-inputs
81 `(("pkg-config" ,pkg-config)
82
83 ;; For building HTML documentation.
84 ("doxygen" ,doxygen)
85
86 ;; For tests.
87 ("check" ,check)))
88 (arguments
89 `(#:configure-flags
90 (list "-Ddocumentation=true"
91 "-Dtest=true")))
92 (synopsis "Music Player Daemon client library")
93 (description "A stable, documented, asynchronous API library for
94 interfacing MPD in the C, C++ & Objective C languages.")
95 (home-page "https://www.musicpd.org/libs/libmpdclient/")
96 (license license:bsd-3)))
97
98 (define-public mpd
99 (package
100 (name "mpd")
101 (version "0.22.2")
102 (source (origin
103 (method url-fetch)
104 (uri
105 (string-append "https://musicpd.org/download/mpd/"
106 (version-major+minor version)
107 "/mpd-" version ".tar.xz"))
108 (sha256
109 (base32
110 "0dldj7r58a3zxbvhs188p8mb4wcffnp66kpnglm4vwcp0wpmn6rn"))))
111 (build-system meson-build-system)
112 (arguments
113 `(#:configure-flags '("-Ddocumentation=enabled")))
114 (inputs `(("ao" ,ao)
115 ("alsa-lib" ,alsa-lib)
116 ("avahi" ,avahi)
117 ("boost" ,boost)
118 ("curl" ,curl)
119 ("ffmpeg" ,ffmpeg)
120 ("flac" ,flac)
121 ("glib" ,glib)
122 ("icu4c" ,icu4c)
123 ;; The LAME decoder comes from FFmpeg, but is added here so that
124 ;; configure picks up the LAME encoder.
125 ("lame" ,lame)
126 ("libid3tag" ,libid3tag)
127 ("libmpdclient" ,libmpdclient)
128 ("libsamplerate" ,libsamplerate)
129 ("libsndfile" ,libsndfile)
130 ("libvorbis" ,libvorbis)
131 ("opus" ,opus)
132 ("pulseaudio" ,pulseaudio)
133 ("sqlite" ,sqlite)
134 ("zlib" ,zlib)))
135 (native-inputs `(("pkg-config" ,pkg-config)
136 ("python-sphinx" ,python-sphinx)))
137 ;; Missing optional inputs:
138 ;; libyajl
139 ;; libcdio_paranoia
140 ;; libmms
141 ;; libadplug
142 ;; libaudiofile
143 ;; faad2
144 ;; fluidsynth
145 ;; libgme
146 ;; libshout
147 ;; libmpg123
148 ;; libmodplug
149 ;; libmpcdec
150 ;; libsidplay2
151 ;; libwavpack
152 ;; libwildmidi
153 ;; libtwolame
154 ;; libroar
155 ;; libjack
156 ;; OpenAL
157 (synopsis "Music Player Daemon")
158 (description "Music Player Daemon (MPD) is a flexible, powerful,
159 server-side application for playing music. Through plugins and libraries it
160 can play a variety of sound files while being controlled by its network
161 protocol.")
162 (home-page "https://www.musicpd.org/")
163 (license license:gpl2)))
164
165 (define-public mpd-mpc
166 (package
167 (name "mpd-mpc")
168 (version "0.33")
169 (source (origin
170 (method url-fetch)
171 (uri
172 (string-append "https://www.musicpd.org/download/mpc/"
173 (car (string-split version #\.))
174 "/mpc-" version ".tar.xz"))
175 (sha256
176 (base32
177 "15hjpzqs83v1zx49x8nkpwy9hpl1jxd55z1w50vm82gm32zcqh2g"))))
178 (build-system meson-build-system)
179 (inputs `(("libmpdclient" ,libmpdclient)))
180 (native-inputs
181 `(("pkg-config" ,pkg-config)
182 ("python-sphinx" ,python-sphinx)))
183 (synopsis "Music Player Daemon client")
184 (description "MPC is a minimalist command line interface to MPD, the music
185 player daemon.")
186 (home-page "https://www.musicpd.org/clients/mpc/")
187 (license license:gpl2)))
188
189 (define-public ncmpc
190 (package
191 (name "ncmpc")
192 (version "0.41")
193 (source (origin
194 (method url-fetch)
195 (uri
196 (string-append "http://musicpd.org/download/ncmpc/"
197 (version-major version)
198 "/ncmpc-" version ".tar.xz"))
199 (sha256
200 (base32
201 "1b0kxidz3h3anc006cjrrbb281zl75f1qaip4m3672pczdc2lwwa"))))
202 (build-system meson-build-system)
203 (arguments
204 `(#:configure-flags
205 ;; Otherwise, they are installed incorrectly, in
206 ;; '$out/share/man/man/man1'.
207 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
208 "/share"))))
209 (inputs `(("boost" ,boost)
210 ("pcre" ,pcre)
211 ("libmpdclient" ,libmpdclient)
212 ("ncurses" ,ncurses)))
213 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
214 ("pkg-config" ,pkg-config)
215 ("python-sphinx" ,python-sphinx)))
216 (synopsis "Curses Music Player Daemon client")
217 (description "ncmpc is a fully featured MPD client, which runs in a
218 terminal using ncurses.")
219 (home-page "https://www.musicpd.org/clients/ncmpc/")
220 (license license:gpl2)))
221
222 (define-public ncmpcpp
223 (package
224 (name "ncmpcpp")
225 (version "0.8.2")
226 (source (origin
227 (method url-fetch)
228 (uri
229 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
230 version ".tar.bz2"))
231 (sha256
232 (base32
233 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
234 (build-system gnu-build-system)
235 (inputs `(("libmpdclient" ,libmpdclient)
236 ("boost" ,boost)
237 ("readline" ,readline)
238 ("ncurses" ,ncurses)
239 ("taglib" ,taglib)
240 ("icu4c" ,icu4c)
241 ("curl" ,curl)))
242 (native-inputs
243 `(("pkg-config" ,pkg-config)))
244 (arguments
245 '(#:configure-flags
246 '("BOOST_LIB_SUFFIX=" "--with-taglib" "--enable-clock")))
247 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
248 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
249 but it provides new useful features such as support for regular expressions
250 for library searches, extended song format, items filtering, the ability to
251 sort playlists, and a local file system browser.")
252 (home-page "https://ncmpcpp.rybczak.net/")
253 (license license:gpl2+)))
254
255 (define-public mpdscribble
256 (package
257 (name "mpdscribble")
258 (version "0.23")
259 (source (origin
260 (method url-fetch)
261 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
262 version "/mpdscribble-" version ".tar.xz"))
263 (sha256
264 (base32
265 "0s66zqscb44p88cl3kcv5jkjcqsskcnrv7xgrjhzrchf2kcpwf53"))))
266 (build-system meson-build-system)
267 (inputs `(("boost" ,boost)
268 ("curl" ,curl)
269 ("libgcrypt" ,libgcrypt)
270 ("libmpdclient" ,libmpdclient)))
271 (native-inputs `(("pkg-config" ,pkg-config)))
272 (synopsis "MPD client for track scrobbling")
273 (description "mpdscribble is a Music Player Daemon client which submits
274 information about tracks being played to a scrobbler, such as Libre.FM.")
275 (home-page "https://www.musicpd.org/clients/mpdscribble/")
276 (license license:gpl2+)))
277
278 (define-public python-mpd2
279 (package
280 (name "python-mpd2")
281 (version "0.5.5")
282 (source (origin
283 (method url-fetch)
284 (uri (pypi-uri "python-mpd2" version))
285 (sha256
286 (base32
287 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
288 (build-system python-build-system)
289 (arguments
290 '(#:phases
291 (modify-phases %standard-phases
292 (replace 'check
293 (lambda _ (invoke "python" "mpd_test.py"))))))
294 (native-inputs `(("python-mock" ,python-mock)))
295 (home-page "https://github.com/Mic92/python-mpd2")
296 (synopsis "Python MPD client library")
297 (description "Python-mpd2 is a Python library which provides a client
298 interface for the Music Player Daemon.")
299 (license license:lgpl3+)))
300
301 (define-public python2-mpd2
302 (package-with-python2 python-mpd2))
303
304 (define-public sonata
305 (package
306 (name "sonata")
307 (version "1.7b1")
308 (source (origin
309 (method git-fetch)
310 (uri (git-reference
311 (url "https://github.com/multani/sonata")
312 (commit (string-append "v" version))))
313 (file-name (git-file-name name version))
314 (sha256
315 (base32
316 "1npbxlrg6k154qybfd250nq2p96kxdsdkj9wwnp93gljnii3g8wh"))))
317 (build-system python-build-system)
318 (arguments
319 `(#:modules ((guix build gnu-build-system)
320 (guix build python-build-system)
321 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
322 (guix build utils))
323 #:imported-modules (,@%gnu-build-system-modules
324 (guix build python-build-system)
325 (guix build glib-or-gtk-build-system))
326 #:phases
327 (modify-phases %standard-phases
328 (add-after 'install 'glib-or-gtk-wrap
329 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
330 (add-after 'install 'wrap-sonata
331 (lambda* (#:key outputs #:allow-other-keys)
332 (let ((out (assoc-ref outputs "out"))
333 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
334 (wrap-program (string-append out "/bin/sonata")
335 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
336 #t)))))
337 (native-inputs
338 `(("gettext" ,gettext-minimal)))
339 (inputs
340 `(("python-mpd2" ,python-mpd2)
341 ("gtk+" ,gtk+)
342 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
343 ("gobject-introspection" ,gobject-introspection)
344 ("adwaita-icon-theme" ,adwaita-icon-theme)
345 ("python-pygobject" ,python-pygobject)))
346 (synopsis "Elegant client for the Music Player Daemon")
347 (description "Sonata is an elegant graphical client for the Music Player
348 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
349 MPD servers, search and multimedia key support.")
350 (home-page "https://www.nongnu.org/sonata/")
351 (license license:gpl3+)))
352
353 (define-public ashuffle
354 (package
355 (name "ashuffle")
356 (version "2.0.2")
357 (source (origin
358 (method git-fetch)
359 (uri (git-reference
360 (url "https://github.com/joshkunz/ashuffle")
361 (commit (string-append "v" version))))
362 (file-name (git-file-name name version))
363 (sha256
364 (base32
365 "11aa95cg0yca2m2d00sar6wr14g3lc7cfm9bin1h7lk7asdm8azp"))))
366 (native-inputs `(("pkg-config" ,pkg-config)))
367 (inputs `(("libmpdclient" ,libmpdclient)))
368 (build-system meson-build-system)
369 (home-page "https://github.com/joshkunz/ashuffle")
370 (synopsis "Automatic library-wide shuffle for mpd")
371 (description "ashuffle is an application for automatically shuffling your
372 MPD library in a similar way to many other music players' 'shuffle library'
373 feature. ashuffle works like any other MPD client, and can be used alongside
374 other MPD frontends.")
375 (license license:expat)))
376
377 (define-public mpdris2
378 (package
379 (name "mpdris2")
380 (version "0.8")
381 (source (origin
382 (method git-fetch)
383 (uri (git-reference
384 (url "https://github.com/eonpatapon/mpDris2")
385 (commit version)))
386 (file-name (git-file-name name version))
387 (sha256
388 (base32
389 "048b8acsd1b8kcxzd9fsh5p9g2an9c4rznicfcpyrsjz5syv894h"))))
390 (build-system gnu-build-system)
391 ;; Manually wrap the binary, because we’re not using python-build-system.
392 (arguments
393 '(#:phases
394 (modify-phases %standard-phases
395 (add-after 'install 'wrap-program
396 (lambda* (#:key inputs outputs #:allow-other-keys)
397 (let ((out (assoc-ref outputs "out"))
398 (python-path (getenv "PYTHONPATH")))
399 (wrap-program (string-append out "/bin/mpDris2")
400 `("PYTHONPATH" ":" prefix (,python-path)))
401 #t))))))
402 (inputs
403 `(("python-mpd2" ,python-mpd2)
404 ("python-dbus" ,python-dbus)
405 ("python-pygobject" ,python-pygobject)
406 ("python" ,python))) ; Sets PYTHONPATH.
407 ;; For bootstrapping.
408 (native-inputs
409 `(("autoconf" ,autoconf)
410 ("automake" ,automake)
411 ("gettext" ,gnu-gettext)
412 ("which" ,which)
413 ("intltool" ,intltool)))
414 (synopsis "MPRIS V2.1 support for MPD")
415 (description "Client for the Music Player Daemon providing MPRIS 2
416 support")
417 (home-page "https://github.com/eonpatapon/mpDris2")
418 (license license:gpl3+)))