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 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2019 Evan Straw <evan.straw99@gmail.com>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages mpd)
27 #:use-module (gnu packages)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix utils)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system meson)
35 #:use-module (guix build-system python)
36 #:use-module (gnu packages avahi)
37 #:use-module (gnu packages boost)
38 #:use-module (gnu packages gettext)
39 #:use-module (gnu packages gnome)
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages icu4c)
42 #:use-module (gnu packages readline)
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages linux)
49 #:use-module (gnu packages mp3)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages pcre)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages pulseaudio)
55 #:use-module (gnu packages sphinx)
56 #:use-module (gnu packages sqlite)
57 #:use-module (gnu packages video)
58 #:use-module (gnu packages xiph))
60 (define-public libmpdclient
67 (string-append "https://musicpd.org/download/libmpdclient/"
68 (car (string-split version #\.))
69 "/libmpdclient-" version ".tar.xz"))
72 "0n9mrrmk20p4mfsz782jziax9z3bn7vxlm53327mrdlmgqf8z6zf"))))
73 (build-system meson-build-system)
75 `(("pkg-config" ,pkg-config)
77 ;; For building HTML documentation.
84 (list "-Ddocumentation=true"
86 (synopsis "Music Player Daemon client library")
87 (description "A stable, documented, asynchronous API library for
88 interfacing MPD in the C, C++ & Objective C languages.")
89 (home-page "https://www.musicpd.org/libs/libmpdclient/")
90 (license license:bsd-3)))
99 (string-append "https://musicpd.org/download/mpd/"
100 (version-major+minor version)
101 "/mpd-" version ".tar.xz"))
104 "0hllkq426hql1s80xxvy28ypvw3dbfrrclbjc0lckmmgsmnfd0l7"))))
105 (build-system meson-build-system)
107 `(#:configure-flags '("-Ddocumentation=true"))) ;the default is 'false'...
109 ("alsa-lib" ,alsa-lib)
117 ;; The LAME decoder comes from FFmpeg, but is added here so that
118 ;; configure picks up the LAME encoder.
120 ("libid3tag" ,libid3tag)
121 ("libmpdclient" ,libmpdclient)
122 ("libsamplerate" ,libsamplerate)
123 ("libsndfile" ,libsndfile)
124 ("libvorbis" ,libvorbis)
126 ("pulseaudio" ,pulseaudio)
129 (native-inputs `(("pkg-config" ,pkg-config)
130 ("python-sphinx" ,python-sphinx)))
131 ;; Missing optional inputs:
151 (synopsis "Music Player Daemon")
152 (description "Music Player Daemon (MPD) is a flexible, powerful,
153 server-side application for playing music. Through plugins and libraries it
154 can play a variety of sound files while being controlled by its network
156 (home-page "https://www.musicpd.org/")
157 (license license:gpl2)))
159 (define-public mpd-mpc
166 (string-append "https://www.musicpd.org/download/mpc/"
167 (car (string-split version #\.))
168 "/mpc-" version ".tar.xz"))
171 "15hjpzqs83v1zx49x8nkpwy9hpl1jxd55z1w50vm82gm32zcqh2g"))))
172 (build-system meson-build-system)
173 (inputs `(("libmpdclient" ,libmpdclient)))
175 `(("pkg-config" ,pkg-config)
176 ("python-sphinx" ,python-sphinx)))
177 (synopsis "Music Player Daemon client")
178 (description "MPC is a minimalist command line interface to MPD, the music
180 (home-page "https://www.musicpd.org/clients/mpc/")
181 (license license:gpl2)))
190 (string-append "http://musicpd.org/download/ncmpc/"
191 (version-major version)
192 "/ncmpc-" version ".tar.xz"))
195 "0b1yg93is9057p9d7vfv5nz85d11p6jq94fw07jn3zlfzhyqfcj6"))))
196 (build-system meson-build-system)
199 ;; Otherwise, they are installed incorrectly, in
200 ;; '$out/share/man/man/man1'.
201 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
203 (inputs `(("boost" ,boost)
205 ("libmpdclient" ,libmpdclient)
206 ("ncurses" ,ncurses)))
207 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
208 ("pkg-config" ,pkg-config)
209 ("python-sphinx" ,python-sphinx)))
210 (synopsis "Curses Music Player Daemon client")
211 (description "ncmpc is a fully featured MPD client, which runs in a
212 terminal using ncurses.")
213 (home-page "https://www.musicpd.org/clients/ncmpc/")
214 (license license:gpl2)))
216 (define-public ncmpcpp
223 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
227 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
228 (build-system gnu-build-system)
229 (inputs `(("libmpdclient" ,libmpdclient)
231 ("readline" ,readline)
237 `(("pkg-config" ,pkg-config)))
240 '("BOOST_LIB_SUFFIX=" "--with-taglib" "--enable-clock")))
241 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
242 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
243 but it provides new useful features such as support for regular expressions
244 for library searches, extended song format, items filtering, the ability to
245 sort playlists, and a local file system browser.")
246 (home-page "https://ncmpcpp.rybczak.net/")
247 (license license:gpl2+)))
249 (define-public mpdscribble
255 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
256 version "/mpdscribble-" version ".tar.gz"))
259 "0f0ybx380x2z2g1qvdndpvcrhkrgsfqckhz3ryydq2w3pl12v27z"))))
260 (build-system gnu-build-system)
261 (inputs `(("libmpdclient" ,libmpdclient)
264 (native-inputs `(("pkg-config" ,pkg-config)))
265 (synopsis "MPD client for track scrobbling")
266 (description "mpdscribble is a Music Player Daemon client which submits
267 information about tracks being played to a scrobbler, such as Libre.FM.")
268 (home-page "https://www.musicpd.org/clients/mpdscribble/")
269 (license license:gpl2+)))
271 (define-public python-mpd2
277 (uri (pypi-uri "python-mpd2" version))
280 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
281 (build-system python-build-system)
284 (modify-phases %standard-phases
286 (lambda _ (invoke "python" "mpd_test.py"))))))
287 (native-inputs `(("python-mock" ,python-mock)))
288 (home-page "https://github.com/Mic92/python-mpd2")
289 (synopsis "Python MPD client library")
290 (description "Python-mpd2 is a Python library which provides a client
291 interface for the Music Player Daemon.")
292 (license license:lgpl3+)))
294 (define-public python2-mpd2
295 (package-with-python2 python-mpd2))
297 (define-public sonata
304 (string-append "https://github.com/multani/sonata/archive/v"
306 (file-name (string-append name "-" version ".tar.gz"))
309 "07gq2nxqwxs0qyxjbay7k5j25zd386bn7wdr2dl1gk53diwnn7s0"))))
310 (build-system python-build-system)
312 `(#:modules ((guix build gnu-build-system)
313 (guix build python-build-system)
314 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
316 #:imported-modules (,@%gnu-build-system-modules
317 (guix build python-build-system)
318 (guix build glib-or-gtk-build-system))
320 (modify-phases %standard-phases
321 (add-after 'install 'glib-or-gtk-wrap
322 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
323 (add-after 'install 'wrap-sonata
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let ((out (assoc-ref outputs "out"))
326 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
327 (wrap-program (string-append out "/bin/sonata")
328 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
331 `(("gettext" ,gettext-minimal)))
333 `(("python-mpd2" ,python-mpd2)
335 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
336 ("gobject-introspection" ,gobject-introspection)
337 ("adwaita-icon-theme" ,adwaita-icon-theme)
338 ("python-pygobject" ,python-pygobject)))
339 (synopsis "Elegant client for the Music Player Daemon")
340 (description "Sonata is an elegant graphical client for the Music Player
341 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
342 MPD servers, search and multimedia key support.")
343 (home-page "https://www.nongnu.org/sonata/")
344 (license license:gpl3+)))
346 (define-public ashuffle
353 (url "https://github.com/joshkunz/ashuffle.git")
354 (commit (string-append "v" version))))
355 (file-name (git-file-name name version))
358 "11aa95cg0yca2m2d00sar6wr14g3lc7cfm9bin1h7lk7asdm8azp"))))
359 (native-inputs `(("pkg-config" ,pkg-config)))
360 (inputs `(("libmpdclient" ,libmpdclient)))
361 (build-system meson-build-system)
362 (home-page "https://github.com/joshkunz/ashuffle")
363 (synopsis "Automatic library-wide shuffle for mpd")
364 (description "ashuffle is an application for automatically shuffling your
365 MPD library in a similar way to many other music players' 'shuffle library'
366 feature. ashuffle works like any other MPD client, and can be used alongside
367 other MPD frontends.")
368 (license license:expat)))