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