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>
13 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
66 (define-public libmpdclient
73 (string-append "https://musicpd.org/download/libmpdclient/"
74 (car (string-split version #\.))
75 "/libmpdclient-" version ".tar.xz"))
78 "12d1fzlkcnjw4ayk2wp11vhglfcvr5k02arzdbkhiavq496av2hm"))))
79 (build-system meson-build-system)
81 `(("pkg-config" ,pkg-config)
83 ;; For building HTML documentation.
90 (list "-Ddocumentation=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)))
105 (string-append "https://musicpd.org/download/mpd/"
106 (version-major+minor version)
107 "/mpd-" version ".tar.xz"))
110 "0dldj7r58a3zxbvhs188p8mb4wcffnp66kpnglm4vwcp0wpmn6rn"))))
111 (build-system meson-build-system)
113 `(#:configure-flags '("-Ddocumentation=enabled")))
115 ("alsa-lib" ,alsa-lib)
123 ;; The LAME decoder comes from FFmpeg, but is added here so that
124 ;; configure picks up the LAME encoder.
126 ("libid3tag" ,libid3tag)
127 ("libmpdclient" ,libmpdclient)
128 ("libsamplerate" ,libsamplerate)
129 ("libsndfile" ,libsndfile)
130 ("libvorbis" ,libvorbis)
132 ("pulseaudio" ,pulseaudio)
135 (native-inputs `(("pkg-config" ,pkg-config)
136 ("python-sphinx" ,python-sphinx)))
137 ;; Missing optional inputs:
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
162 (home-page "https://www.musicpd.org/")
163 (license license:gpl2)))
165 (define-public mpd-mpc
172 (string-append "https://www.musicpd.org/download/mpc/"
173 (car (string-split version #\.))
174 "/mpc-" version ".tar.xz"))
177 "15hjpzqs83v1zx49x8nkpwy9hpl1jxd55z1w50vm82gm32zcqh2g"))))
178 (build-system meson-build-system)
179 (inputs `(("libmpdclient" ,libmpdclient)))
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
186 (home-page "https://www.musicpd.org/clients/mpc/")
187 (license license:gpl2)))
196 (string-append "http://musicpd.org/download/ncmpc/"
197 (version-major version)
198 "/ncmpc-" version ".tar.xz"))
201 "1b0kxidz3h3anc006cjrrbb281zl75f1qaip4m3672pczdc2lwwa"))))
202 (build-system meson-build-system)
205 ;; Otherwise, they are installed incorrectly, in
206 ;; '$out/share/man/man/man1'.
207 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
209 (inputs `(("boost" ,boost)
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)))
222 (define-public ncmpcpp
229 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
233 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
234 (build-system gnu-build-system)
235 (inputs `(("libmpdclient" ,libmpdclient)
237 ("readline" ,readline)
243 `(("pkg-config" ,pkg-config)))
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+)))
255 (define-public mpdscribble
261 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
262 version "/mpdscribble-" version ".tar.xz"))
265 "0s66zqscb44p88cl3kcv5jkjcqsskcnrv7xgrjhzrchf2kcpwf53"))))
266 (build-system meson-build-system)
267 (inputs `(("boost" ,boost)
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+)))
278 (define-public python-mpd2
284 (uri (pypi-uri "python-mpd2" version))
287 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
288 (build-system python-build-system)
291 (modify-phases %standard-phases
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+)))
301 (define-public python2-mpd2
302 (package-with-python2 python-mpd2))
304 (define-public sonata
311 (url "https://github.com/multani/sonata")
312 (commit (string-append "v" version))))
313 (file-name (git-file-name name version))
316 "1npbxlrg6k154qybfd250nq2p96kxdsdkj9wwnp93gljnii3g8wh"))))
317 (build-system python-build-system)
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:)
323 #:imported-modules (,@%gnu-build-system-modules
324 (guix build python-build-system)
325 (guix build glib-or-gtk-build-system))
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))))
338 `(("gettext" ,gettext-minimal)))
340 `(("python-mpd2" ,python-mpd2)
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+)))
353 (define-public ashuffle
360 (url "https://github.com/joshkunz/ashuffle")
361 (commit (string-append "v" version))))
362 (file-name (git-file-name name version))
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)))
377 (define-public mpdris2
384 (url "https://github.com/eonpatapon/mpDris2")
386 (file-name (git-file-name name version))
389 "048b8acsd1b8kcxzd9fsh5p9g2an9c4rznicfcpyrsjz5syv894h"))))
390 (build-system gnu-build-system)
391 ;; Manually wrap the binary, because we’re not using python-build-system.
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)))
403 `(("python-mpd2" ,python-mpd2)
404 ("python-dbus" ,python-dbus)
405 ("python-pygobject" ,python-pygobject)
406 ("python" ,python))) ; Sets PYTHONPATH.
407 ;; For bootstrapping.
409 `(("autoconf" ,autoconf)
410 ("automake" ,automake)
411 ("gettext" ,gnu-gettext)
413 ("intltool" ,intltool)))
414 (synopsis "MPRIS V2.1 support for MPD")
415 (description "Client for the Music Player Daemon providing MPRIS 2
417 (home-page "https://github.com/eonpatapon/mpDris2")
418 (license license:gpl3+)))