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 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages mpd)
26 #:use-module (gnu packages)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix utils)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system meson)
33 #:use-module (guix build-system python)
34 #:use-module (gnu packages avahi)
35 #:use-module (gnu packages boost)
36 #:use-module (gnu packages gettext)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages icu4c)
40 #:use-module (gnu packages readline)
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages curl)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages mp3)
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages pcre)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages pulseaudio)
53 #:use-module (gnu packages sphinx)
54 #:use-module (gnu packages sqlite)
55 #:use-module (gnu packages video)
56 #:use-module (gnu packages xiph))
58 (define-public libmpdclient
65 (string-append "https://musicpd.org/download/libmpdclient/"
66 (car (string-split version #\.))
67 "/libmpdclient-" version ".tar.xz"))
70 "0r24cl3i9nvs6a47mvwaxk1kb5wmnhkhrw1q5cq9010fgjvdlszs"))))
71 (build-system meson-build-system)
73 `(("pkg-config" ,pkg-config)
75 ;; For building HTML documentation.
82 (list "-Ddocumentation=true"
84 (synopsis "Music Player Daemon client library")
85 (description "A stable, documented, asynchronous API library for
86 interfacing MPD in the C, C++ & Objective C languages.")
87 (home-page "https://www.musicpd.org/libs/libmpdclient/")
88 (license license:bsd-3)))
97 (string-append "https://musicpd.org/download/mpd/"
98 (version-major+minor version)
99 "/mpd-" version ".tar.xz"))
102 "0iknnm9xvwfgk8h82hjwrmbijpk9l0dgap0794c2nyg8i66qlb0y"))))
103 (build-system meson-build-system)
105 `(#:configure-flags '("-Ddocumentation=true"))) ;the default is 'false'...
107 ("alsa-lib" ,alsa-lib)
115 ;; The LAME decoder comes from FFmpeg, but is added here so that
116 ;; configure picks up the LAME encoder.
118 ("libid3tag" ,libid3tag)
119 ("libmpdclient" ,libmpdclient)
120 ("libsamplerate" ,libsamplerate)
121 ("libsndfile" ,libsndfile)
122 ("libvorbis" ,libvorbis)
124 ("pulseaudio" ,pulseaudio)
127 (native-inputs `(("pkg-config" ,pkg-config)
128 ("python-sphinx" ,python-sphinx)))
129 ;; Missing optional inputs:
149 (synopsis "Music Player Daemon")
150 (description "Music Player Daemon (MPD) is a flexible, powerful,
151 server-side application for playing music. Through plugins and libraries it
152 can play a variety of sound files while being controlled by its network
154 (home-page "https://www.musicpd.org/")
155 (license license:gpl2)))
157 (define-public mpd-mpc
164 (string-append "https://www.musicpd.org/download/mpc/"
165 (car (string-split version #\.))
166 "/mpc-" version ".tar.xz"))
169 "1irilgz64pny7b8zygy5i74nfmlhgsawz0djx9mrj6g0gidxjqbr"))))
170 (build-system meson-build-system)
171 (inputs `(("libmpdclient" ,libmpdclient)))
173 `(("pkg-config" ,pkg-config)
174 ("python-sphinx" ,python-sphinx)))
175 (synopsis "Music Player Daemon client")
176 (description "MPC is a minimalist command line interface to MPD, the music
178 (home-page "https://www.musicpd.org/clients/mpc/")
179 (license license:gpl2)))
188 (string-append "http://musicpd.org/download/ncmpc/"
189 (version-major version)
190 "/ncmpc-" version ".tar.xz"))
193 "0hfjvm1p0z7x6gfn5xhl5c0jsmidvz0qfl04pq45x4chh9iiwkxx"))))
194 (build-system meson-build-system)
197 ;; Otherwise, they are installed incorrectly, in
198 ;; '$out/share/man/man/man1'.
199 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
201 (inputs `(("boost" ,boost)
203 ("libmpdclient" ,libmpdclient)
204 ("ncurses" ,ncurses)))
205 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
206 ("pkg-config" ,pkg-config)
207 ("python-sphinx" ,python-sphinx)))
208 (synopsis "Curses Music Player Daemon client")
209 (description "ncmpc is a fully featured MPD client, which runs in a
210 terminal using ncurses.")
211 (home-page "https://www.musicpd.org/clients/ncmpc/")
212 (license license:gpl2)))
214 (define-public ncmpcpp
221 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
225 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
226 (build-system gnu-build-system)
227 (inputs `(("libmpdclient" ,libmpdclient)
229 ("readline" ,readline)
235 `(("pkg-config" ,pkg-config)))
238 '("BOOST_LIB_SUFFIX=" "--with-taglib")))
239 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
240 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
241 but it provides new useful features such as support for regular expressions
242 for library searches, extended song format, items filtering, the ability to
243 sort playlists, and a local file system browser.")
244 (home-page "https://ncmpcpp.rybczak.net/")
245 (license license:gpl2+)))
247 (define-public mpdscribble
253 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
254 version "/mpdscribble-" version ".tar.gz"))
257 "0f0ybx380x2z2g1qvdndpvcrhkrgsfqckhz3ryydq2w3pl12v27z"))))
258 (build-system gnu-build-system)
259 (inputs `(("libmpdclient" ,libmpdclient)
262 (native-inputs `(("pkg-config" ,pkg-config)))
263 (synopsis "MPD client for track scrobbling")
264 (description "mpdscribble is a Music Player Daemon client which submits
265 information about tracks being played to a scrobbler, such as Libre.FM.")
266 (home-page "https://www.musicpd.org/clients/mpdscribble/")
267 (license license:gpl2+)))
269 (define-public python-mpd2
275 (uri (pypi-uri "python-mpd2" version))
278 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
279 (build-system python-build-system)
282 (modify-phases %standard-phases
284 (lambda _ (invoke "python" "mpd_test.py"))))))
285 (native-inputs `(("python-mock" ,python-mock)))
286 (home-page "https://github.com/Mic92/python-mpd2")
287 (synopsis "Python MPD client library")
288 (description "Python-mpd2 is a Python library which provides a client
289 interface for the Music Player Daemon.")
290 (license license:lgpl3+)))
292 (define-public python2-mpd2
293 (package-with-python2 python-mpd2))
295 (define-public sonata
302 (string-append "https://github.com/multani/sonata/archive/v"
304 (file-name (string-append name "-" version ".tar.gz"))
307 "07gq2nxqwxs0qyxjbay7k5j25zd386bn7wdr2dl1gk53diwnn7s0"))))
308 (build-system python-build-system)
310 `(#:modules ((guix build gnu-build-system)
311 (guix build python-build-system)
312 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
314 #:imported-modules (,@%gnu-build-system-modules
315 (guix build python-build-system)
316 (guix build glib-or-gtk-build-system))
318 (modify-phases %standard-phases
319 (add-after 'install 'glib-or-gtk-wrap
320 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
321 (add-after 'install 'wrap-sonata
322 (lambda* (#:key outputs #:allow-other-keys)
323 (let ((out (assoc-ref outputs "out"))
324 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
325 (wrap-program (string-append out "/bin/sonata")
326 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
329 `(("gettext" ,gettext-minimal)))
331 `(("python-mpd2" ,python-mpd2)
333 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
334 ("gobject-introspection" ,gobject-introspection)
335 ("adwaita-icon-theme" ,adwaita-icon-theme)
336 ("python-pygobject" ,python-pygobject)))
337 (synopsis "Elegant client for the Music Player Daemon")
338 (description "Sonata is an elegant graphical client for the Music Player
339 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
340 MPD servers, search and multimedia key support.")
341 (home-page "https://www.nongnu.org/sonata/")
342 (license license:gpl3+)))