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 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 gcc)
37 #:use-module (gnu packages gettext)
38 #:use-module (gnu packages gnome)
39 #:use-module (gnu packages gtk)
40 #:use-module (gnu packages icu4c)
41 #:use-module (gnu packages readline)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages curl)
45 #:use-module (gnu packages documentation)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages linux)
48 #:use-module (gnu packages mp3)
49 #:use-module (gnu packages ncurses)
50 #:use-module (gnu packages pcre)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages python)
53 #:use-module (gnu packages python-xyz)
54 #:use-module (gnu packages pulseaudio)
55 #:use-module (gnu packages sqlite)
56 #:use-module (gnu packages video)
57 #:use-module (gnu packages xiph))
59 (define-public libmpdclient
66 (string-append "https://musicpd.org/download/libmpdclient/"
67 (car (string-split version #\.))
68 "/libmpdclient-" version ".tar.xz"))
71 "0r24cl3i9nvs6a47mvwaxk1kb5wmnhkhrw1q5cq9010fgjvdlszs"))))
72 (build-system meson-build-system)
74 `(("pkg-config" ,pkg-config)
76 ;; For building HTML documentation.
83 (list "-Ddocumentation=true"
85 (synopsis "Music Player Daemon client library")
86 (description "A stable, documented, asynchronous API library for
87 interfacing MPD in the C, C++ & Objective C languages.")
88 (home-page "https://www.musicpd.org/libs/libmpdclient/")
89 (license license:bsd-3)))
98 (string-append "https://musicpd.org/download/mpd/"
99 (version-major+minor version)
100 "/mpd-" version ".tar.xz"))
103 "17z580gqwsr4xp3x124aapw96pl8hk91c43ld2x75606rim12kcd"))))
104 (build-system meson-build-system)
106 `(#:configure-flags '("-Ddocumentation=true") ; The default is 'false'...
108 (modify-phases %standard-phases
109 (add-before 'configure 'expand-C++-include-path
110 ;; Make <gcc>/include/c++/ext/string_conversions.h find <stdlib.h>.
111 (lambda* (#:key inputs #:allow-other-keys)
112 (let* ((path "CPLUS_INCLUDE_PATH")
113 (gcc (assoc-ref inputs "gcc"))
114 (c++ (string-append gcc "/include/c++")))
115 (setenv path (string-append c++ ":" (getenv path)))
118 ("alsa-lib" ,alsa-lib)
126 ;; The LAME decoder comes from FFmpeg, but is added here so that
127 ;; configure picks up the LAME encoder.
129 ("libid3tag" ,libid3tag)
130 ("libmpdclient" ,libmpdclient)
131 ("libsamplerate" ,libsamplerate)
132 ("libsndfile" ,libsndfile)
133 ("libvorbis" ,libvorbis)
135 ("pulseaudio" ,pulseaudio)
138 ;; MPD > 0.21 requires > GCC 6
139 (native-inputs `(("gcc" ,gcc-8)
140 ("gcc-lib" ,gcc-8 "lib")
141 ("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 "0b9bsn4sl26xc6wdcms51x9yxznkxkppaycn8gnv4rd1m21kwdv2"))))
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 "19fp7xkpai4lq3vmpbppgh3ism7lg2sibv237c0sl5a0hls4mq4l"))))
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")
216 (modify-phases %standard-phases
217 (add-before 'configure 'expand-C++-include-path
218 ;; Make <gcc>/include/c++/ext/string_conversions.h find <stdlib.h>.
219 (lambda* (#:key inputs #:allow-other-keys)
220 (let* ((path "CPLUS_INCLUDE_PATH")
221 (gcc (assoc-ref inputs "gcc"))
222 (c++ (string-append gcc "/include/c++")))
223 (setenv path (string-append c++ ":" (getenv path)))
225 (inputs `(("gcc" ,gcc-8) ; for its C++14 support
228 ("libmpdclient" ,libmpdclient)
229 ("ncurses" ,ncurses)))
230 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
231 ("pkg-config" ,pkg-config)
232 ("python-sphinx" ,python-sphinx)))
233 (synopsis "Curses Music Player Daemon client")
234 (description "ncmpc is a fully featured MPD client, which runs in a
235 terminal using ncurses.")
236 (home-page "https://www.musicpd.org/clients/ncmpc/")
237 (license license:gpl2)))
239 (define-public ncmpcpp
246 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
250 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
251 (build-system gnu-build-system)
252 (inputs `(("libmpdclient" ,libmpdclient)
254 ("readline" ,readline)
260 `(("pkg-config" ,pkg-config)))
263 '("BOOST_LIB_SUFFIX=" "--with-taglib")))
264 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
265 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
266 but it provides new useful features such as support for regular expressions
267 for library searches, extended song format, items filtering, the ability to
268 sort playlists, and a local file system browser.")
269 (home-page "https://ncmpcpp.rybczak.net/")
270 (license license:gpl2+)))
272 (define-public mpdscribble
278 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
279 version "/mpdscribble-" version ".tar.gz"))
282 "0f0ybx380x2z2g1qvdndpvcrhkrgsfqckhz3ryydq2w3pl12v27z"))))
283 (build-system gnu-build-system)
284 (inputs `(("libmpdclient" ,libmpdclient)
287 (native-inputs `(("pkg-config" ,pkg-config)))
288 (synopsis "MPD client for track scrobbling")
289 (description "mpdscribble is a Music Player Daemon client which submits
290 information about tracks being played to a scrobbler, such as Libre.FM.")
291 (home-page "https://www.musicpd.org/clients/mpdscribble/")
292 (license license:gpl2+)))
294 (define-public python-mpd2
300 (uri (pypi-uri "python-mpd2" version))
303 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
304 (build-system python-build-system)
307 (modify-phases %standard-phases
309 (lambda _ (invoke "python" "mpd_test.py"))))))
310 (native-inputs `(("python-mock" ,python-mock)))
311 (home-page "https://github.com/Mic92/python-mpd2")
312 (synopsis "Python MPD client library")
313 (description "Python-mpd2 is a Python library which provides a client
314 interface for the Music Player Daemon.")
315 (license license:lgpl3+)))
317 (define-public python2-mpd2
318 (package-with-python2 python-mpd2))
320 (define-public sonata
327 (string-append "https://github.com/multani/sonata/archive/v"
329 (file-name (string-append name "-" version ".tar.gz"))
332 "07gq2nxqwxs0qyxjbay7k5j25zd386bn7wdr2dl1gk53diwnn7s0"))))
333 (build-system python-build-system)
335 `(#:modules ((guix build gnu-build-system)
336 (guix build python-build-system)
337 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
339 #:imported-modules (,@%gnu-build-system-modules
340 (guix build python-build-system)
341 (guix build glib-or-gtk-build-system))
343 (modify-phases %standard-phases
344 (add-after 'install 'glib-or-gtk-wrap
345 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
346 (add-after 'install 'wrap-sonata
347 (lambda* (#:key outputs #:allow-other-keys)
348 (let ((out (assoc-ref outputs "out"))
349 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
350 (wrap-program (string-append out "/bin/sonata")
351 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
354 `(("gettext" ,gettext-minimal)))
356 `(("python-mpd2" ,python-mpd2)
358 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
359 ("gobject-introspection" ,gobject-introspection)
360 ("adwaita-icon-theme" ,adwaita-icon-theme)
361 ("python-pygobject" ,python-pygobject)))
362 (synopsis "Elegant client for the Music Player Daemon")
363 (description "Sonata is an elegant graphical client for the Music Player
364 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
365 MPD servers, search and multimedia key support.")
366 (home-page "https://www.nongnu.org/sonata/")
367 (license license:gpl3+)))