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 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 "1smg6hab4kwrzsw1k7vlpya3ampdk8psnmkrzxlgb43j4fgmygjh"))))
104 (build-system gnu-build-system)
107 (modify-phases %standard-phases
108 (add-after 'install 'install-service-files
109 (lambda* (#:key outputs #:allow-other-keys)
110 (let* ((out (assoc-ref outputs "out"))
111 (systemd (string-append out "/etc/systemd/system"))
112 (systemd-user (string-append out "/etc/systemd/user")))
113 (install-file "systemd/system/mpd.service" systemd)
114 (install-file "systemd/user/mpd.service" systemd-user)
117 ("alsa-lib" ,alsa-lib)
125 ;; The LAME decoder comes from FFmpeg, but is added here so that
126 ;; configure picks up the LAME encoder.
128 ("libid3tag" ,libid3tag)
129 ("libmpdclient" ,libmpdclient)
130 ("libsamplerate" ,libsamplerate)
131 ("libsndfile" ,libsndfile)
132 ("libvorbis" ,libvorbis)
134 ("pulseaudio" ,pulseaudio)
137 (native-inputs `(("pkg-config" ,pkg-config)))
138 ;; Missing optional inputs:
158 (synopsis "Music Player Daemon")
159 (description "Music Player Daemon (MPD) is a flexible, powerful,
160 server-side application for playing music. Through plugins and libraries it
161 can play a variety of sound files while being controlled by its network
163 (home-page "https://www.musicpd.org/")
164 (license license:gpl2)))
166 (define-public mpd-mpc
173 (string-append "https://www.musicpd.org/download/mpc/"
174 (car (string-split version #\.))
175 "/mpc-" version ".tar.xz"))
178 "0b9bsn4sl26xc6wdcms51x9yxznkxkppaycn8gnv4rd1m21kwdv2"))))
179 (build-system meson-build-system)
180 (inputs `(("libmpdclient" ,libmpdclient)))
182 `(("pkg-config" ,pkg-config)
183 ("python-sphinx" ,python-sphinx)))
184 (synopsis "Music Player Daemon client")
185 (description "MPC is a minimalist command line interface to MPD, the music
187 (home-page "https://www.musicpd.org/clients/mpc/")
188 (license license:gpl2)))
197 (string-append "http://musicpd.org/download/ncmpc/"
198 (version-major version)
199 "/ncmpc-" version ".tar.xz"))
202 "19fp7xkpai4lq3vmpbppgh3ism7lg2sibv237c0sl5a0hls4mq4l"))))
203 (build-system meson-build-system)
206 ;; Otherwise, they are installed incorrectly, in
207 ;; '$out/share/man/man/man1'.
208 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
211 (modify-phases %standard-phases
212 (add-before 'configure 'expand-C++-include-path
213 ;; Make <gcc>/include/c++/ext/string_conversions.h find <stdlib.h>.
214 (lambda* (#:key inputs #:allow-other-keys)
215 (let* ((path "CPLUS_INCLUDE_PATH")
216 (gcc (assoc-ref inputs "gcc"))
217 (c++ (string-append gcc "/include/c++")))
218 (setenv path (string-append c++ ":" (getenv path)))
220 (inputs `(("gcc" ,gcc-8) ; for its C++14 support
223 ("libmpdclient" ,libmpdclient)
224 ("ncurses" ,ncurses)))
225 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
226 ("pkg-config" ,pkg-config)
227 ("python-sphinx" ,python-sphinx)))
228 (synopsis "Curses Music Player Daemon client")
229 (description "ncmpc is a fully featured MPD client, which runs in a
230 terminal using ncurses.")
231 (home-page "https://www.musicpd.org/clients/ncmpc/")
232 (license license:gpl2)))
234 (define-public ncmpcpp
241 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
245 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
246 (build-system gnu-build-system)
247 (inputs `(("libmpdclient" ,libmpdclient)
248 ("boost" ,boost-cxx14)
249 ("readline" ,readline)
255 `(("pkg-config" ,pkg-config)))
258 '("BOOST_LIB_SUFFIX=" "--with-taglib")))
259 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
260 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
261 but it provides new useful features such as support for regular expressions
262 for library searches, extended song format, items filtering, the ability to
263 sort playlists, and a local file system browser.")
264 (home-page "https://ncmpcpp.rybczak.net/")
265 (license license:gpl2+)))
267 (define-public mpdscribble
273 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
274 version "/mpdscribble-" version ".tar.gz"))
277 "0f0ybx380x2z2g1qvdndpvcrhkrgsfqckhz3ryydq2w3pl12v27z"))))
278 (build-system gnu-build-system)
279 (inputs `(("libmpdclient" ,libmpdclient)
282 (native-inputs `(("pkg-config" ,pkg-config)))
283 (synopsis "MPD client for track scrobbling")
284 (description "mpdscribble is a Music Player Daemon client which submits
285 information about tracks being played to a scrobbler, such as Libre.FM.")
286 (home-page "https://www.musicpd.org/clients/mpdscribble/")
287 (license license:gpl2+)))
289 (define-public python-mpd2
295 (uri (pypi-uri "python-mpd2" version))
298 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
299 (build-system python-build-system)
302 (modify-phases %standard-phases
304 (lambda _ (invoke "python" "mpd_test.py"))))))
305 (native-inputs `(("python-mock" ,python-mock)))
306 (home-page "https://github.com/Mic92/python-mpd2")
307 (synopsis "Python MPD client library")
308 (description "Python-mpd2 is a Python library which provides a client
309 interface for the Music Player Daemon.")
310 (license license:lgpl3+)))
312 (define-public python2-mpd2
313 (package-with-python2 python-mpd2))
315 (define-public sonata
322 (string-append "https://github.com/multani/sonata/archive/v"
324 (file-name (string-append name "-" version ".tar.gz"))
327 "07gq2nxqwxs0qyxjbay7k5j25zd386bn7wdr2dl1gk53diwnn7s0"))))
328 (build-system python-build-system)
330 `(#:modules ((guix build gnu-build-system)
331 (guix build python-build-system)
332 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
334 #:imported-modules (,@%gnu-build-system-modules
335 (guix build python-build-system)
336 (guix build glib-or-gtk-build-system))
338 (modify-phases %standard-phases
339 (add-after 'install 'glib-or-gtk-wrap
340 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
341 (add-after 'install 'wrap-sonata
342 (lambda* (#:key outputs #:allow-other-keys)
343 (let ((out (assoc-ref outputs "out"))
344 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
345 (wrap-program (string-append out "/bin/sonata")
346 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
349 `(("gettext" ,gettext-minimal)))
351 `(("python-mpd2" ,python-mpd2)
353 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
354 ("gobject-introspection" ,gobject-introspection)
355 ("adwaita-icon-theme" ,adwaita-icon-theme)
356 ("python-pygobject" ,python-pygobject)))
357 (synopsis "Elegant client for the Music Player Daemon")
358 (description "Sonata is an elegant graphical client for the Music Player
359 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
360 MPD servers, search and multimedia key support.")
361 (home-page "https://www.nongnu.org/sonata/")
362 (license license:gpl3+)))