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 ;;; Copyright © 2020 Simon Streit <simon@netpanic.org>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages mpd)
30 #:use-module (gnu packages)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system meson)
39 #:use-module (guix build-system python)
40 #:use-module (gnu packages audio)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages avahi)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages boost)
45 #:use-module (gnu packages cdrom)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages gnupg)
49 #:use-module (gnu packages gtk)
50 #:use-module (gnu packages icu4c)
51 #:use-module (gnu packages libusb)
52 #:use-module (gnu packages readline)
53 #:use-module (gnu packages check)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages curl)
56 #:use-module (gnu packages documentation)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages mp3)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages pcre)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages python-xyz)
65 #:use-module (gnu packages pulseaudio)
66 #:use-module (gnu packages qt)
67 #:use-module (gnu packages sphinx)
68 #:use-module (gnu packages sqlite)
69 #:use-module (gnu packages video)
70 #:use-module (gnu packages xiph))
72 (define-public libmpdclient
79 (string-append "https://musicpd.org/download/libmpdclient/"
80 (car (string-split version #\.))
81 "/libmpdclient-" version ".tar.xz"))
84 "12d1fzlkcnjw4ayk2wp11vhglfcvr5k02arzdbkhiavq496av2hm"))))
85 (build-system meson-build-system)
87 `(("pkg-config" ,pkg-config)
89 ;; For building HTML documentation.
96 (list "-Ddocumentation=true"
98 (synopsis "Music Player Daemon client library")
99 (description "A stable, documented, asynchronous API library for
100 interfacing MPD in the C, C++ & Objective C languages.")
101 (home-page "https://www.musicpd.org/libs/libmpdclient/")
102 (license license:bsd-3)))
111 (string-append "https://musicpd.org/download/mpd/"
112 (version-major+minor version)
113 "/mpd-" version ".tar.xz"))
116 "1kvcarqijyw07bdqszjsn62plmncaid5az0q542p6rsygc1i501k"))))
117 (build-system meson-build-system)
119 `(#:configure-flags '("-Ddocumentation=enabled")))
121 ("alsa-lib" ,alsa-lib)
129 ;; The LAME decoder comes from FFmpeg, but is added here so that
130 ;; configure picks up the LAME encoder.
132 ("libid3tag" ,libid3tag)
133 ("libmpdclient" ,libmpdclient)
134 ("libsamplerate" ,libsamplerate)
135 ("libsndfile" ,libsndfile)
136 ("libvorbis" ,libvorbis)
138 ("pulseaudio" ,pulseaudio)
141 (native-inputs `(("pkg-config" ,pkg-config)
142 ("python-sphinx" ,python-sphinx)))
143 ;; Missing optional inputs:
163 (synopsis "Music Player Daemon")
164 (description "Music Player Daemon (MPD) is a flexible, powerful,
165 server-side application for playing music. Through plugins and libraries it
166 can play a variety of sound files while being controlled by its network
168 (home-page "https://www.musicpd.org/")
169 (license license:gpl2)))
171 (define-public mpd-mpc
178 (string-append "https://www.musicpd.org/download/mpc/"
179 (car (string-split version #\.))
180 "/mpc-" version ".tar.xz"))
183 "15hjpzqs83v1zx49x8nkpwy9hpl1jxd55z1w50vm82gm32zcqh2g"))))
184 (build-system meson-build-system)
185 (inputs `(("libmpdclient" ,libmpdclient)))
187 `(("pkg-config" ,pkg-config)
188 ("python-sphinx" ,python-sphinx)))
189 (synopsis "Music Player Daemon client")
190 (description "MPC is a minimalist command line interface to MPD, the music
192 (home-page "https://www.musicpd.org/clients/mpc/")
193 (license license:gpl2)))
202 (string-append "http://musicpd.org/download/ncmpc/"
203 (version-major version)
204 "/ncmpc-" version ".tar.xz"))
207 "0kfdyvqd2dfrxll5bla8mm10xvpngshlmyjf6wic4wbafqflgxx5"))))
208 (build-system meson-build-system)
211 ;; Otherwise, they are installed incorrectly, in
212 ;; '$out/share/man/man/man1'.
213 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
215 (inputs `(("boost" ,boost)
217 ("libmpdclient" ,libmpdclient)
218 ("ncurses" ,ncurses)))
219 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
220 ("pkg-config" ,pkg-config)
221 ("python-sphinx" ,python-sphinx)))
222 (synopsis "Curses Music Player Daemon client")
223 (description "ncmpc is a fully featured MPD client, which runs in a
224 terminal using ncurses.")
225 (home-page "https://www.musicpd.org/clients/ncmpc/")
226 (license license:gpl2)))
228 (define-public ncmpcpp
235 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
239 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
240 (build-system gnu-build-system)
241 (inputs `(("libmpdclient" ,libmpdclient)
243 ("readline" ,readline)
249 `(("pkg-config" ,pkg-config)))
252 '("BOOST_LIB_SUFFIX=" "--with-taglib" "--enable-clock")))
253 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
254 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
255 but it provides new useful features such as support for regular expressions
256 for library searches, extended song format, items filtering, the ability to
257 sort playlists, and a local file system browser.")
258 (home-page "https://ncmpcpp.rybczak.net/")
259 (license license:gpl2+)))
261 (define-public mpdscribble
267 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
268 version "/mpdscribble-" version ".tar.xz"))
271 "0s66zqscb44p88cl3kcv5jkjcqsskcnrv7xgrjhzrchf2kcpwf53"))))
272 (build-system meson-build-system)
273 (inputs `(("boost" ,boost)
275 ("libgcrypt" ,libgcrypt)
276 ("libmpdclient" ,libmpdclient)))
277 (native-inputs `(("pkg-config" ,pkg-config)))
278 (synopsis "MPD client for track scrobbling")
279 (description "mpdscribble is a Music Player Daemon client which submits
280 information about tracks being played to a scrobbler, such as Libre.FM.")
281 (home-page "https://www.musicpd.org/clients/mpdscribble/")
282 (license license:gpl2+)))
284 (define-public python-mpd2
290 (uri (pypi-uri "python-mpd2" version))
293 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
294 (build-system python-build-system)
297 (modify-phases %standard-phases
299 (lambda _ (invoke "python" "mpd_test.py"))))))
300 (native-inputs `(("python-mock" ,python-mock)))
301 (home-page "https://github.com/Mic92/python-mpd2")
302 (synopsis "Python MPD client library")
303 (description "Python-mpd2 is a Python library which provides a client
304 interface for the Music Player Daemon.")
305 (license license:lgpl3+)))
307 (define-public python2-mpd2
308 (package-with-python2 python-mpd2))
310 (define-public sonata
317 (url "https://github.com/multani/sonata")
318 (commit (string-append "v" version))))
319 (file-name (git-file-name name version))
322 "1npbxlrg6k154qybfd250nq2p96kxdsdkj9wwnp93gljnii3g8wh"))))
323 (build-system python-build-system)
325 `(#:modules ((guix build gnu-build-system)
326 (guix build python-build-system)
327 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
329 #:imported-modules (,@%gnu-build-system-modules
330 (guix build python-build-system)
331 (guix build glib-or-gtk-build-system))
333 (modify-phases %standard-phases
334 (add-after 'install 'glib-or-gtk-wrap
335 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
336 (add-after 'install 'wrap-sonata
337 (lambda* (#:key outputs #:allow-other-keys)
338 (let ((out (assoc-ref outputs "out"))
339 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
340 (wrap-program (string-append out "/bin/sonata")
341 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
344 `(("gettext" ,gettext-minimal)))
346 `(("python-mpd2" ,python-mpd2)
348 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
349 ("gobject-introspection" ,gobject-introspection)
350 ("adwaita-icon-theme" ,adwaita-icon-theme)
351 ("python-pygobject" ,python-pygobject)))
352 (synopsis "Elegant client for the Music Player Daemon")
353 (description "Sonata is an elegant graphical client for the Music Player
354 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
355 MPD servers, search and multimedia key support.")
356 (home-page "https://www.nongnu.org/sonata/")
357 (license license:gpl3+)))
359 (define-public ashuffle
366 (url "https://github.com/joshkunz/ashuffle")
367 (commit (string-append "v" version))))
368 (file-name (git-file-name name version))
371 "11aa95cg0yca2m2d00sar6wr14g3lc7cfm9bin1h7lk7asdm8azp"))))
372 (native-inputs `(("pkg-config" ,pkg-config)))
373 (inputs `(("libmpdclient" ,libmpdclient)))
374 (build-system meson-build-system)
375 (home-page "https://github.com/joshkunz/ashuffle")
376 (synopsis "Automatic library-wide shuffle for mpd")
377 (description "ashuffle is an application for automatically shuffling your
378 MPD library in a similar way to many other music players' 'shuffle library'
379 feature. ashuffle works like any other MPD client, and can be used alongside
380 other MPD frontends.")
381 (license license:expat)))
383 (define-public mpdris2
390 (url "https://github.com/eonpatapon/mpDris2")
392 (file-name (git-file-name name version))
395 "048b8acsd1b8kcxzd9fsh5p9g2an9c4rznicfcpyrsjz5syv894h"))))
396 (build-system gnu-build-system)
397 ;; Manually wrap the binary, because we’re not using python-build-system.
400 (modify-phases %standard-phases
401 (add-after 'install 'wrap-program
402 (lambda* (#:key inputs outputs #:allow-other-keys)
403 (let ((out (assoc-ref outputs "out"))
404 (python-path (getenv "PYTHONPATH")))
405 (wrap-program (string-append out "/bin/mpDris2")
406 `("PYTHONPATH" ":" prefix (,python-path)))
409 `(("python-mpd2" ,python-mpd2)
410 ("python-dbus" ,python-dbus)
411 ("python-pygobject" ,python-pygobject)
412 ("python" ,python))) ; Sets PYTHONPATH.
413 ;; For bootstrapping.
415 `(("autoconf" ,autoconf)
416 ("automake" ,automake)
417 ("gettext" ,gettext-minimal)
419 ("intltool" ,intltool)))
420 (synopsis "MPRIS V2.1 support for MPD")
421 (description "Client for the Music Player Daemon providing MPRIS 2
423 (home-page "https://github.com/eonpatapon/mpDris2")
424 (license license:gpl3+)))
426 (define-public cantata
432 (uri (string-append "https://github.com/CDrummond/"
433 "cantata/releases/download/v" version "/"
434 "cantata-" version ".tar.bz2"))
437 "10pcrpmb4n1mkgr21xd580nrbmh57q7s72cbs1zay847hc65vliy"))))
438 (build-system cmake-build-system)
440 `(#:tests? #f)) ; No test suite
442 `(("pkg-config" ,pkg-config)))
446 ("libcdio-paranoia" ,libcdio-paranoia)
447 ("libebur128" ,libebur128)
451 ("qtmultimedia" ,qtmultimedia)
455 (synopsis "Graphical MPD Client")
456 (description "Cantata is a graphical client for the Music Player Daemon
457 (MPD), using the Qt5 toolkit. Its user interface is highly customizable,
458 supporting multiple collections, ratings, and dynamic playlists. A local cache
459 of the music library will be created to provide a hierarchy of albums and
460 artists along with albumart.")
461 (home-page "https://github.com/cdrummond/cantata")
462 (license license:gpl3+)))