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>
9 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
54 (define-public libmpdclient
61 (string-append "http://musicpd.org/download/libmpdclient/"
62 (car (string-split version #\.))
63 "/libmpdclient-" version ".tar.xz"))
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)))
82 (string-append "http://musicpd.org/download/mpd/"
83 (version-major+minor version)
84 "/mpd-" version ".tar.xz"))
87 "1dsfwd0i81x8m9idi7idm9612mpf1g5lzcy69h04nd9jks3a4xyd"))))
88 (build-system gnu-build-system)
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)
101 ("alsa-lib" ,alsa-lib)
110 ("libid3tag" ,libid3tag)
112 ("libmpdclient" ,libmpdclient)
113 ("libsamplerate" ,libsamplerate)
114 ("libsndfile" ,libsndfile)
115 ("libvorbis" ,libvorbis)
117 ("pulseaudio" ,pulseaudio)
120 (native-inputs `(("pkg-config" ,pkg-config)))
121 ;; Missing optional inputs:
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
146 (home-page "http://www.musicpd.org/")
147 (license license:gpl2)))
149 (define-public mpd-mpc
156 (string-append "http://www.musicpd.org/download/mpc/"
157 (car (string-split version #\.))
158 "/mpc-" version ".tar.xz"))
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
168 (home-page "http://www.musicpd.org/clients/mpc/")
169 (license license:gpl2)))
178 (string-append "http://musicpd.org/download/ncmpc/"
179 (car (string-split version #\.))
180 "/ncmpc-" version ".tar.xz"))
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)))
195 (define-public ncmpcpp
202 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
206 "0nj6ky805a55acj0w57sbn3vfmmkbqp97rhbi0q9848n10f2l3rg"))))
207 (build-system gnu-build-system)
208 (inputs `(("libmpdclient" ,libmpdclient)
210 ("readline" ,readline)
216 `(("pkg-config" ,pkg-config)))
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+)))
228 (define-public mpdscribble
234 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
235 version "/mpdscribble-" version ".tar.gz"))
238 "0f0ybx380x2z2g1qvdndpvcrhkrgsfqckhz3ryydq2w3pl12v27z"))))
239 (build-system gnu-build-system)
240 (inputs `(("libmpdclient" ,libmpdclient)
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
249 (home-page "http://mpd.wikia.com/wiki/Client:Mpdscribble")
250 (license license:gpl2+)))
252 (define-public python-mpd2
258 (uri (pypi-uri "python-mpd2" version))
261 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
262 (build-system python-build-system)
265 (modify-phases %standard-phases
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+)))
275 (define-public python2-mpd2
276 (package-with-python2 python-mpd2))
278 (define-public sonata
285 (string-append "https://github.com/multani/sonata/archive/v"
287 (file-name (string-append name "-" version ".tar.gz"))
290 "07gq2nxqwxs0qyxjbay7k5j25zd386bn7wdr2dl1gk53diwnn7s0"))))
291 (build-system python-build-system)
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:)
297 #:imported-modules (,@%gnu-build-system-modules
298 (guix build python-build-system)
299 (guix build glib-or-gtk-build-system))
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))))
312 `(("gettext" ,gettext-minimal)))
314 `(("python-mpd2" ,python-mpd2)
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+)))