gnu: Fix input typoes.
[jackhill/guix/guix.git] / gnu / packages / mpd.scm
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–2021 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2019 Evan Straw <evan.straw99@gmail.com>
10 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2020 Lars-Dominik Braun <lars@6xq.net>
12 ;;; Copyright © 2020 Simon Streit <simon@netpanic.org>
13 ;;; Copyright © 2021 Noah Evans <noah@nevans.me>
14 ;;;
15 ;;; This file is part of GNU Guix.
16 ;;;
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
21 ;;;
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
26 ;;;
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30 (define-module (gnu packages mpd)
31 #:use-module (gnu packages)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (guix download)
35 #:use-module (guix git-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system meson)
40 #:use-module (guix build-system python)
41 #:use-module (gnu packages audio)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages avahi)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages boost)
46 #:use-module (gnu packages cdrom)
47 #:use-module (gnu packages gettext)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages gnupg)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages icu4c)
52 #:use-module (gnu packages libusb)
53 #:use-module (gnu packages readline)
54 #:use-module (gnu packages check)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages curl)
57 #:use-module (gnu packages documentation)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages linux)
60 #:use-module (gnu packages mp3)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages pcre)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages python-xyz)
66 #:use-module (gnu packages pulseaudio)
67 #:use-module (gnu packages qt)
68 #:use-module (gnu packages sphinx)
69 #:use-module (gnu packages sqlite)
70 #:use-module (gnu packages video)
71 #:use-module (gnu packages xiph))
72
73 (define-public libmpdclient
74 (package
75 (name "libmpdclient")
76 (version "2.19")
77 (source (origin
78 (method url-fetch)
79 (uri
80 (string-append "https://musicpd.org/download/libmpdclient/"
81 (car (string-split version #\.))
82 "/libmpdclient-" version ".tar.xz"))
83 (sha256
84 (base32
85 "12d1fzlkcnjw4ayk2wp11vhglfcvr5k02arzdbkhiavq496av2hm"))))
86 (build-system meson-build-system)
87 (native-inputs
88 `(("pkg-config" ,pkg-config)
89
90 ;; For building HTML documentation.
91 ("doxygen" ,doxygen)
92
93 ;; For tests.
94 ("check" ,check)))
95 (arguments
96 `(#:configure-flags
97 (list "-Ddocumentation=true"
98 "-Dtest=true")))
99 (synopsis "Music Player Daemon client library")
100 (description "A stable, documented, asynchronous API library for
101 interfacing MPD in the C, C++ & Objective C languages.")
102 (home-page "https://www.musicpd.org/libs/libmpdclient/")
103 (license license:bsd-3)))
104
105 (define-public mpd
106 (package
107 (name "mpd")
108 (version "0.22.6")
109 (source (origin
110 (method url-fetch)
111 (uri
112 (string-append "https://musicpd.org/download/mpd/"
113 (version-major+minor version)
114 "/mpd-" version ".tar.xz"))
115 (sha256
116 (base32
117 "0pjdd8qwia1dsfkzyxcasfhxiqwk6lcz333z8w9vcg2wi6j4kq9b"))))
118 (build-system meson-build-system)
119 (arguments
120 `(#:configure-flags '("-Ddocumentation=enabled")))
121 (inputs `(("ao" ,ao)
122 ("alsa-lib" ,alsa-lib)
123 ("avahi" ,avahi)
124 ("boost" ,boost)
125 ("curl" ,curl)
126 ("ffmpeg" ,ffmpeg)
127 ("flac" ,flac)
128 ("glib" ,glib)
129 ("icu4c" ,icu4c)
130 ;; The LAME decoder comes from FFmpeg, but is added here so that
131 ;; configure picks up the LAME encoder.
132 ("lame" ,lame)
133 ("libid3tag" ,libid3tag)
134 ("libmpdclient" ,libmpdclient)
135 ("libsamplerate" ,libsamplerate)
136 ("libsndfile" ,libsndfile)
137 ("libvorbis" ,libvorbis)
138 ("opus" ,opus)
139 ("pulseaudio" ,pulseaudio)
140 ("sqlite" ,sqlite)
141 ("zlib" ,zlib)))
142 (native-inputs `(("pkg-config" ,pkg-config)
143 ("python-sphinx" ,python-sphinx)))
144 ;; Missing optional inputs:
145 ;; libyajl
146 ;; libcdio_paranoia
147 ;; libmms
148 ;; libadplug
149 ;; libaudiofile
150 ;; faad2
151 ;; fluidsynth
152 ;; libgme
153 ;; libshout
154 ;; libmpg123
155 ;; libmodplug
156 ;; libmpcdec
157 ;; libsidplay2
158 ;; libwavpack
159 ;; libwildmidi
160 ;; libtwolame
161 ;; libroar
162 ;; libjack
163 ;; OpenAL
164 (synopsis "Music Player Daemon")
165 (description "Music Player Daemon (MPD) is a flexible, powerful,
166 server-side application for playing music. Through plugins and libraries it
167 can play a variety of sound files while being controlled by its network
168 protocol.")
169 (home-page "https://www.musicpd.org/")
170 (license license:gpl2)))
171
172 (define-public mpd-mpc
173 (package
174 (name "mpd-mpc")
175 (version "0.33")
176 (source (origin
177 (method url-fetch)
178 (uri
179 (string-append "https://www.musicpd.org/download/mpc/"
180 (car (string-split version #\.))
181 "/mpc-" version ".tar.xz"))
182 (sha256
183 (base32
184 "15hjpzqs83v1zx49x8nkpwy9hpl1jxd55z1w50vm82gm32zcqh2g"))))
185 (build-system meson-build-system)
186 (inputs `(("libmpdclient" ,libmpdclient)))
187 (native-inputs
188 `(("pkg-config" ,pkg-config)
189 ("python-sphinx" ,python-sphinx)))
190 (synopsis "Music Player Daemon client")
191 (description "MPC is a minimalist command line interface to MPD, the music
192 player daemon.")
193 (home-page "https://www.musicpd.org/clients/mpc/")
194 (license license:gpl2)))
195
196 (define-public ncmpc
197 (package
198 (name "ncmpc")
199 (version "0.45")
200 (source (origin
201 (method url-fetch)
202 (uri
203 (string-append "http://musicpd.org/download/ncmpc/"
204 (version-major version)
205 "/ncmpc-" version ".tar.xz"))
206 (sha256
207 (base32
208 "11gpy6kd7xr8x7f7gwdwfryxyc58cd135ds28gnz40p08xj49zqp"))))
209 (build-system meson-build-system)
210 (arguments
211 `(#:configure-flags
212 ;; Otherwise, they are installed incorrectly, in
213 ;; '$out/share/man/man/man1'.
214 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
215 "/share"))))
216 (inputs `(("boost" ,boost)
217 ("pcre" ,pcre)
218 ("libmpdclient" ,libmpdclient)
219 ("ncurses" ,ncurses)))
220 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
221 ("pkg-config" ,pkg-config)
222 ("python-sphinx" ,python-sphinx)))
223 (synopsis "Curses Music Player Daemon client")
224 (description "ncmpc is a fully featured MPD client, which runs in a
225 terminal using ncurses.")
226 (home-page "https://www.musicpd.org/clients/ncmpc/")
227 (license license:gpl2)))
228
229 (define-public ncmpcpp
230 (package
231 (name "ncmpcpp")
232 (version "0.9.2")
233 (source (origin
234 (method url-fetch)
235 (uri
236 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
237 version ".tar.bz2"))
238 (sha256
239 (base32
240 "06rs734n120jp51hr0fkkhxrm7zscbhpdwls0m5b5cccghazdazs"))))
241 (build-system gnu-build-system)
242 (inputs `(("libmpdclient" ,libmpdclient)
243 ("boost" ,boost)
244 ("readline" ,readline)
245 ("ncurses" ,ncurses)
246 ("taglib" ,taglib)
247 ("icu4c" ,icu4c)
248 ("curl" ,curl)))
249 (native-inputs
250 `(("pkg-config" ,pkg-config)))
251 (arguments
252 '(#:configure-flags
253 '("BOOST_LIB_SUFFIX=" "--with-taglib" "--enable-clock")))
254 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
255 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
256 but it provides new useful features such as support for regular expressions
257 for library searches, extended song format, items filtering, the ability to
258 sort playlists, and a local file system browser.")
259 (home-page "https://ncmpcpp.rybczak.net/")
260 (license license:gpl2+)))
261
262 (define-public mpdscribble
263 (package
264 (name "mpdscribble")
265 (version "0.23")
266 (source (origin
267 (method url-fetch)
268 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
269 version "/mpdscribble-" version ".tar.xz"))
270 (sha256
271 (base32
272 "0s66zqscb44p88cl3kcv5jkjcqsskcnrv7xgrjhzrchf2kcpwf53"))))
273 (build-system meson-build-system)
274 (inputs `(("boost" ,boost)
275 ("curl" ,curl)
276 ("libgcrypt" ,libgcrypt)
277 ("libmpdclient" ,libmpdclient)))
278 (native-inputs `(("pkg-config" ,pkg-config)))
279 (synopsis "MPD client for track scrobbling")
280 (description "mpdscribble is a Music Player Daemon client which submits
281 information about tracks being played to a scrobbler, such as Libre.FM.")
282 (home-page "https://www.musicpd.org/clients/mpdscribble/")
283 (license license:gpl2+)))
284
285 (define-public python-mpd2
286 (package
287 (name "python-mpd2")
288 (version "3.0.1")
289 (source (origin
290 (method url-fetch)
291 (uri (pypi-uri "python-mpd2" version))
292 (sha256
293 (base32
294 "0fxssbmnv44m03shjyvbqslc69b0160702j2s0flgvdxjggrnbjj"))))
295 (build-system python-build-system)
296 (arguments
297 '(#:phases
298 (modify-phases %standard-phases
299 (replace 'check
300 (lambda _ (invoke "python" "-m" "pytest" "mpd/tests.py"))))))
301 (native-inputs
302 `(("python-mock" ,python-mock)
303 ("python-pytest" ,python-pytest)))
304 (home-page "https://github.com/Mic92/python-mpd2")
305 (synopsis "Python MPD client library")
306 (description "Python-mpd2 is a Python library which provides a client
307 interface for the Music Player Daemon.")
308 (license license:lgpl3+)))
309
310 (define-public python2-mpd2
311 (package-with-python2 python-mpd2))
312
313 (define-public sonata
314 (package
315 (name "sonata")
316 (version "1.7.0")
317 (source (origin
318 (method git-fetch)
319 (uri (git-reference
320 (url "https://github.com/multani/sonata")
321 (commit (string-append "v" version))))
322 (file-name (git-file-name name version))
323 (sha256
324 (base32
325 "0rl8w7s2asff626clzfvyz987l2k4ml5dg417mqp9v8a962q0v2x"))))
326 (build-system python-build-system)
327 (arguments
328 `(#:modules ((guix build gnu-build-system)
329 (guix build python-build-system)
330 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
331 (guix build utils))
332 #:imported-modules (,@%gnu-build-system-modules
333 (guix build python-build-system)
334 (guix build glib-or-gtk-build-system))
335 #:phases
336 (modify-phases %standard-phases
337 (add-after 'install 'glib-or-gtk-wrap
338 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
339 (add-after 'install 'wrap-sonata
340 (lambda* (#:key outputs #:allow-other-keys)
341 (let ((out (assoc-ref outputs "out"))
342 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
343 (wrap-program (string-append out "/bin/sonata")
344 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
345 #t)))))
346 (native-inputs
347 `(("gettext" ,gettext-minimal)))
348 (inputs
349 `(("python-mpd2" ,python-mpd2)
350 ("gtk+" ,gtk+)
351 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
352 ("gobject-introspection" ,gobject-introspection)
353 ("adwaita-icon-theme" ,adwaita-icon-theme)
354 ("python-pygobject" ,python-pygobject)))
355 (synopsis "Elegant client for the Music Player Daemon")
356 (description "Sonata is an elegant graphical client for the Music Player
357 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
358 MPD servers, search and multimedia key support.")
359 (home-page "https://www.nongnu.org/sonata/")
360 (license license:gpl3+)))
361
362 (define-public ashuffle
363 (package
364 (name "ashuffle")
365 (version "2.0.2")
366 (source (origin
367 (method git-fetch)
368 (uri (git-reference
369 (url "https://github.com/joshkunz/ashuffle")
370 (commit (string-append "v" version))))
371 (file-name (git-file-name name version))
372 (sha256
373 (base32
374 "11aa95cg0yca2m2d00sar6wr14g3lc7cfm9bin1h7lk7asdm8azp"))))
375 (native-inputs `(("pkg-config" ,pkg-config)))
376 (inputs `(("libmpdclient" ,libmpdclient)))
377 (build-system meson-build-system)
378 (home-page "https://github.com/joshkunz/ashuffle")
379 (synopsis "Automatic library-wide shuffle for mpd")
380 (description "ashuffle is an application for automatically shuffling your
381 MPD library in a similar way to many other music players' 'shuffle library'
382 feature. ashuffle works like any other MPD client, and can be used alongside
383 other MPD frontends.")
384 (license license:expat)))
385
386 (define-public mpdris2
387 (package
388 (name "mpdris2")
389 (version "0.8")
390 (source (origin
391 (method git-fetch)
392 (uri (git-reference
393 (url "https://github.com/eonpatapon/mpDris2")
394 (commit version)))
395 (file-name (git-file-name name version))
396 (sha256
397 (base32
398 "048b8acsd1b8kcxzd9fsh5p9g2an9c4rznicfcpyrsjz5syv894h"))))
399 (build-system gnu-build-system)
400 ;; Manually wrap the binary, because we’re not using python-build-system.
401 (arguments
402 '(#:phases
403 (modify-phases %standard-phases
404 (add-after 'install 'wrap-program
405 (lambda* (#:key inputs outputs #:allow-other-keys)
406 (let ((out (assoc-ref outputs "out"))
407 (python-path (getenv "PYTHONPATH")))
408 (wrap-program (string-append out "/bin/mpDris2")
409 `("PYTHONPATH" ":" prefix (,python-path)))
410 #t))))))
411 (inputs
412 `(("python-mpd2" ,python-mpd2)
413 ("python-dbus" ,python-dbus)
414 ("python-pygobject" ,python-pygobject)
415 ("python" ,python))) ; Sets PYTHONPATH.
416 ;; For bootstrapping.
417 (native-inputs
418 `(("autoconf" ,autoconf)
419 ("automake" ,automake)
420 ("gettext" ,gettext-minimal)
421 ("which" ,which)
422 ("intltool" ,intltool)))
423 (synopsis "MPRIS V2.1 support for MPD")
424 (description "Client for the Music Player Daemon providing MPRIS 2
425 support")
426 (home-page "https://github.com/eonpatapon/mpDris2")
427 (license license:gpl3+)))
428
429 (define-public cantata
430 (package
431 (name "cantata")
432 (version "2.4.2")
433 (source (origin
434 (method url-fetch)
435 (uri (string-append "https://github.com/CDrummond/"
436 "cantata/releases/download/v" version "/"
437 "cantata-" version ".tar.bz2"))
438 (sha256
439 (base32
440 "10pcrpmb4n1mkgr21xd580nrbmh57q7s72cbs1zay847hc65vliy"))))
441 (build-system cmake-build-system)
442 (arguments
443 `(#:tests? #f)) ; No test suite
444 (native-inputs
445 `(("pkg-config" ,pkg-config)))
446 (inputs
447 `(("eudev" ,eudev)
448 ("ffmpeg" ,ffmpeg)
449 ("libcdio-paranoia" ,libcdio-paranoia)
450 ("libebur128" ,libebur128)
451 ("libmtp" ,libmtp)
452 ("mpg123" ,mpg123)
453 ("qtbase" ,qtbase)
454 ("qtmultimedia" ,qtmultimedia)
455 ("qtsvg" ,qtsvg)
456 ("taglib" ,taglib)
457 ("zlib" ,zlib)))
458 (synopsis "Graphical MPD Client")
459 (description "Cantata is a graphical client for the Music Player Daemon
460 (MPD), using the Qt5 toolkit. Its user interface is highly customizable,
461 supporting multiple collections, ratings, and dynamic playlists. A local cache
462 of the music library will be created to provide a hierarchy of albums and
463 artists along with albumart.")
464 (home-page "https://github.com/cdrummond/cantata")
465 (license license:gpl3+)))
466
467 (define-public mcg
468 (package
469 (name "mcg")
470 (version "2.1.2")
471 (source
472 (origin
473 (method git-fetch)
474 (uri
475 (git-reference
476 (url "https://gitlab.com/coderkun/mcg")
477 (commit (string-append "v" version))))
478 (file-name (git-file-name name version))
479 (sha256
480 (base32
481 "01iqxydssxyi4s644dwl64vm7xhn0szd99hdpywbipvb7kwp5196"))))
482 (build-system python-build-system)
483 (native-inputs
484 `(("glib:bin" ,glib "bin")
485 ("gobject-introspection" ,gobject-introspection)
486 ("pkg-config" ,pkg-config)))
487 (inputs
488 `(("avahi" ,avahi)
489 ("dconf" ,dconf)
490 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
491 ("gtk+" ,gtk+)
492 ("python-pygobject" ,python-pygobject)))
493 (arguments
494 `(#:imported-modules ((guix build glib-or-gtk-build-system)
495 ,@%python-build-system-modules)
496 #:modules ((guix build python-build-system)
497 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
498 (guix build utils))
499 #:phases
500 (modify-phases %standard-phases
501 (add-after 'install 'wrap-program
502 (lambda* (#:key outputs #:allow-other-keys)
503 (let ((prog (string-append (assoc-ref outputs "out")
504 "/bin/mcg")))
505 (wrap-program prog
506 `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
507 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
508 #t)))
509 (add-after 'wrap-program 'glib-or-gtk-wrap
510 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
511 (synopsis "Covergrid for the MPD")
512 (description
513 "mcg (CoverGrid) is a client for the Music Player Daemon (MPD), focusing
514 on albums instead of single tracks. It is not intended to be a replacement
515 for your favorite MPD client but an addition to get a better
516 album-experience.")
517 (home-page "https://gitlab.com/coderkun/mcg")
518 (license license:gpl3+)))