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, 2020 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 gnupg)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages icu4c)
43 #:use-module (gnu packages readline)
44 #:use-module (gnu packages check)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages curl)
47 #:use-module (gnu packages documentation)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages mp3)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages pcre)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages pulseaudio)
56 #:use-module (gnu packages sphinx)
57 #:use-module (gnu packages sqlite)
58 #:use-module (gnu packages video)
59 #:use-module (gnu packages xiph))
61 (define-public libmpdclient
68 (string-append "https://musicpd.org/download/libmpdclient/"
69 (car (string-split version #\.))
70 "/libmpdclient-" version ".tar.xz"))
73 "12d1fzlkcnjw4ayk2wp11vhglfcvr5k02arzdbkhiavq496av2hm"))))
74 (build-system meson-build-system)
76 `(("pkg-config" ,pkg-config)
78 ;; For building HTML documentation.
85 (list "-Ddocumentation=true"
87 (synopsis "Music Player Daemon client library")
88 (description "A stable, documented, asynchronous API library for
89 interfacing MPD in the C, C++ & Objective C languages.")
90 (home-page "https://www.musicpd.org/libs/libmpdclient/")
91 (license license:bsd-3)))
100 (string-append "https://musicpd.org/download/mpd/"
101 (version-major+minor version)
102 "/mpd-" version ".tar.xz"))
105 "1sjfx9ln2zik5fr5mdjy1w184hgjn89v67i85z09x0m6qwhq5rpr"))))
106 (build-system meson-build-system)
108 `(#:configure-flags '("-Ddocumentation=true"))) ;the default is 'false'...
110 ("alsa-lib" ,alsa-lib)
118 ;; The LAME decoder comes from FFmpeg, but is added here so that
119 ;; configure picks up the LAME encoder.
121 ("libid3tag" ,libid3tag)
122 ("libmpdclient" ,libmpdclient)
123 ("libsamplerate" ,libsamplerate)
124 ("libsndfile" ,libsndfile)
125 ("libvorbis" ,libvorbis)
127 ("pulseaudio" ,pulseaudio)
130 (native-inputs `(("pkg-config" ,pkg-config)
131 ("python-sphinx" ,python-sphinx)))
132 ;; Missing optional inputs:
152 (synopsis "Music Player Daemon")
153 (description "Music Player Daemon (MPD) is a flexible, powerful,
154 server-side application for playing music. Through plugins and libraries it
155 can play a variety of sound files while being controlled by its network
157 (home-page "https://www.musicpd.org/")
158 (license license:gpl2)))
160 (define-public mpd-mpc
167 (string-append "https://www.musicpd.org/download/mpc/"
168 (car (string-split version #\.))
169 "/mpc-" version ".tar.xz"))
172 "15hjpzqs83v1zx49x8nkpwy9hpl1jxd55z1w50vm82gm32zcqh2g"))))
173 (build-system meson-build-system)
174 (inputs `(("libmpdclient" ,libmpdclient)))
176 `(("pkg-config" ,pkg-config)
177 ("python-sphinx" ,python-sphinx)))
178 (synopsis "Music Player Daemon client")
179 (description "MPC is a minimalist command line interface to MPD, the music
181 (home-page "https://www.musicpd.org/clients/mpc/")
182 (license license:gpl2)))
191 (string-append "http://musicpd.org/download/ncmpc/"
192 (version-major version)
193 "/ncmpc-" version ".tar.xz"))
196 "1a0i1wm9287kd4nqii28dp84260063kyl726yjzxzr7vq8hf7sv4"))))
197 (build-system meson-build-system)
200 ;; Otherwise, they are installed incorrectly, in
201 ;; '$out/share/man/man/man1'.
202 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
204 (inputs `(("boost" ,boost)
206 ("libmpdclient" ,libmpdclient)
207 ("ncurses" ,ncurses)))
208 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
209 ("pkg-config" ,pkg-config)
210 ("python-sphinx" ,python-sphinx)))
211 (synopsis "Curses Music Player Daemon client")
212 (description "ncmpc is a fully featured MPD client, which runs in a
213 terminal using ncurses.")
214 (home-page "https://www.musicpd.org/clients/ncmpc/")
215 (license license:gpl2)))
217 (define-public ncmpcpp
224 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
228 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
229 (build-system gnu-build-system)
230 (inputs `(("libmpdclient" ,libmpdclient)
232 ("readline" ,readline)
238 `(("pkg-config" ,pkg-config)))
241 '("BOOST_LIB_SUFFIX=" "--with-taglib" "--enable-clock")))
242 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
243 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
244 but it provides new useful features such as support for regular expressions
245 for library searches, extended song format, items filtering, the ability to
246 sort playlists, and a local file system browser.")
247 (home-page "https://ncmpcpp.rybczak.net/")
248 (license license:gpl2+)))
250 (define-public mpdscribble
256 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
257 version "/mpdscribble-" version ".tar.xz"))
260 "0s66zqscb44p88cl3kcv5jkjcqsskcnrv7xgrjhzrchf2kcpwf53"))))
261 (build-system meson-build-system)
262 (inputs `(("boost" ,boost)
264 ("libgcrypt" ,libgcrypt)
265 ("libmpdclient" ,libmpdclient)))
266 (native-inputs `(("pkg-config" ,pkg-config)))
267 (synopsis "MPD client for track scrobbling")
268 (description "mpdscribble is a Music Player Daemon client which submits
269 information about tracks being played to a scrobbler, such as Libre.FM.")
270 (home-page "https://www.musicpd.org/clients/mpdscribble/")
271 (license license:gpl2+)))
273 (define-public python-mpd2
279 (uri (pypi-uri "python-mpd2" version))
282 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
283 (build-system python-build-system)
286 (modify-phases %standard-phases
288 (lambda _ (invoke "python" "mpd_test.py"))))))
289 (native-inputs `(("python-mock" ,python-mock)))
290 (home-page "https://github.com/Mic92/python-mpd2")
291 (synopsis "Python MPD client library")
292 (description "Python-mpd2 is a Python library which provides a client
293 interface for the Music Player Daemon.")
294 (license license:lgpl3+)))
296 (define-public python2-mpd2
297 (package-with-python2 python-mpd2))
299 (define-public sonata
306 (url "https://github.com/multani/sonata")
307 (commit (string-append "v" version))))
308 (file-name (git-file-name name version))
311 "1npbxlrg6k154qybfd250nq2p96kxdsdkj9wwnp93gljnii3g8wh"))))
312 (build-system python-build-system)
314 `(#:modules ((guix build gnu-build-system)
315 (guix build python-build-system)
316 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
318 #:imported-modules (,@%gnu-build-system-modules
319 (guix build python-build-system)
320 (guix build glib-or-gtk-build-system))
322 (modify-phases %standard-phases
323 (add-after 'install 'glib-or-gtk-wrap
324 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
325 (add-after 'install 'wrap-sonata
326 (lambda* (#:key outputs #:allow-other-keys)
327 (let ((out (assoc-ref outputs "out"))
328 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
329 (wrap-program (string-append out "/bin/sonata")
330 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
333 `(("gettext" ,gettext-minimal)))
335 `(("python-mpd2" ,python-mpd2)
337 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
338 ("gobject-introspection" ,gobject-introspection)
339 ("adwaita-icon-theme" ,adwaita-icon-theme)
340 ("python-pygobject" ,python-pygobject)))
341 (synopsis "Elegant client for the Music Player Daemon")
342 (description "Sonata is an elegant graphical client for the Music Player
343 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
344 MPD servers, search and multimedia key support.")
345 (home-page "https://www.nongnu.org/sonata/")
346 (license license:gpl3+)))
348 (define-public ashuffle
355 (url "https://github.com/joshkunz/ashuffle")
356 (commit (string-append "v" version))))
357 (file-name (git-file-name name version))
360 "11aa95cg0yca2m2d00sar6wr14g3lc7cfm9bin1h7lk7asdm8azp"))))
361 (native-inputs `(("pkg-config" ,pkg-config)))
362 (inputs `(("libmpdclient" ,libmpdclient)))
363 (build-system meson-build-system)
364 (home-page "https://github.com/joshkunz/ashuffle")
365 (synopsis "Automatic library-wide shuffle for mpd")
366 (description "ashuffle is an application for automatically shuffling your
367 MPD library in a similar way to many other music players' 'shuffle library'
368 feature. ashuffle works like any other MPD client, and can be used alongside
369 other MPD frontends.")
370 (license license:expat)))