Merge branch 'master' into staging
[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, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2019 Evan Straw <evan.straw99@gmail.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
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.
17 ;;;
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.
22 ;;;
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/>.
25
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))
60
61 (define-public libmpdclient
62 (package
63 (name "libmpdclient")
64 (version "2.19")
65 (source (origin
66 (method url-fetch)
67 (uri
68 (string-append "https://musicpd.org/download/libmpdclient/"
69 (car (string-split version #\.))
70 "/libmpdclient-" version ".tar.xz"))
71 (sha256
72 (base32
73 "12d1fzlkcnjw4ayk2wp11vhglfcvr5k02arzdbkhiavq496av2hm"))))
74 (build-system meson-build-system)
75 (native-inputs
76 `(("pkg-config" ,pkg-config)
77
78 ;; For building HTML documentation.
79 ("doxygen" ,doxygen)
80
81 ;; For tests.
82 ("check" ,check)))
83 (arguments
84 `(#:configure-flags
85 (list "-Ddocumentation=true"
86 "-Dtest=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)))
92
93 (define-public mpd
94 (package
95 (name "mpd")
96 (version "0.21.26")
97 (source (origin
98 (method url-fetch)
99 (uri
100 (string-append "https://musicpd.org/download/mpd/"
101 (version-major+minor version)
102 "/mpd-" version ".tar.xz"))
103 (sha256
104 (base32
105 "1sjfx9ln2zik5fr5mdjy1w184hgjn89v67i85z09x0m6qwhq5rpr"))))
106 (build-system meson-build-system)
107 (arguments
108 `(#:configure-flags '("-Ddocumentation=true"))) ;the default is 'false'...
109 (inputs `(("ao" ,ao)
110 ("alsa-lib" ,alsa-lib)
111 ("avahi" ,avahi)
112 ("boost" ,boost)
113 ("curl" ,curl)
114 ("ffmpeg" ,ffmpeg)
115 ("flac" ,flac)
116 ("glib" ,glib)
117 ("icu4c" ,icu4c)
118 ;; The LAME decoder comes from FFmpeg, but is added here so that
119 ;; configure picks up the LAME encoder.
120 ("lame" ,lame)
121 ("libid3tag" ,libid3tag)
122 ("libmpdclient" ,libmpdclient)
123 ("libsamplerate" ,libsamplerate)
124 ("libsndfile" ,libsndfile)
125 ("libvorbis" ,libvorbis)
126 ("opus" ,opus)
127 ("pulseaudio" ,pulseaudio)
128 ("sqlite" ,sqlite)
129 ("zlib" ,zlib)))
130 (native-inputs `(("pkg-config" ,pkg-config)
131 ("python-sphinx" ,python-sphinx)))
132 ;; Missing optional inputs:
133 ;; libyajl
134 ;; libcdio_paranoia
135 ;; libmms
136 ;; libadplug
137 ;; libaudiofile
138 ;; faad2
139 ;; fluidsynth
140 ;; libgme
141 ;; libshout
142 ;; libmpg123
143 ;; libmodplug
144 ;; libmpcdec
145 ;; libsidplay2
146 ;; libwavpack
147 ;; libwildmidi
148 ;; libtwolame
149 ;; libroar
150 ;; libjack
151 ;; OpenAL
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
156 protocol.")
157 (home-page "https://www.musicpd.org/")
158 (license license:gpl2)))
159
160 (define-public mpd-mpc
161 (package
162 (name "mpd-mpc")
163 (version "0.33")
164 (source (origin
165 (method url-fetch)
166 (uri
167 (string-append "https://www.musicpd.org/download/mpc/"
168 (car (string-split version #\.))
169 "/mpc-" version ".tar.xz"))
170 (sha256
171 (base32
172 "15hjpzqs83v1zx49x8nkpwy9hpl1jxd55z1w50vm82gm32zcqh2g"))))
173 (build-system meson-build-system)
174 (inputs `(("libmpdclient" ,libmpdclient)))
175 (native-inputs
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
180 player daemon.")
181 (home-page "https://www.musicpd.org/clients/mpc/")
182 (license license:gpl2)))
183
184 (define-public ncmpc
185 (package
186 (name "ncmpc")
187 (version "0.39")
188 (source (origin
189 (method url-fetch)
190 (uri
191 (string-append "http://musicpd.org/download/ncmpc/"
192 (version-major version)
193 "/ncmpc-" version ".tar.xz"))
194 (sha256
195 (base32
196 "1a0i1wm9287kd4nqii28dp84260063kyl726yjzxzr7vq8hf7sv4"))))
197 (build-system meson-build-system)
198 (arguments
199 `(#:configure-flags
200 ;; Otherwise, they are installed incorrectly, in
201 ;; '$out/share/man/man/man1'.
202 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
203 "/share"))))
204 (inputs `(("boost" ,boost)
205 ("pcre" ,pcre)
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)))
216
217 (define-public ncmpcpp
218 (package
219 (name "ncmpcpp")
220 (version "0.8.2")
221 (source (origin
222 (method url-fetch)
223 (uri
224 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
225 version ".tar.bz2"))
226 (sha256
227 (base32
228 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
229 (build-system gnu-build-system)
230 (inputs `(("libmpdclient" ,libmpdclient)
231 ("boost" ,boost)
232 ("readline" ,readline)
233 ("ncurses" ,ncurses)
234 ("taglib" ,taglib)
235 ("icu4c" ,icu4c)
236 ("curl" ,curl)))
237 (native-inputs
238 `(("pkg-config" ,pkg-config)))
239 (arguments
240 '(#:configure-flags
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+)))
249
250 (define-public mpdscribble
251 (package
252 (name "mpdscribble")
253 (version "0.23")
254 (source (origin
255 (method url-fetch)
256 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
257 version "/mpdscribble-" version ".tar.xz"))
258 (sha256
259 (base32
260 "0s66zqscb44p88cl3kcv5jkjcqsskcnrv7xgrjhzrchf2kcpwf53"))))
261 (build-system meson-build-system)
262 (inputs `(("boost" ,boost)
263 ("curl" ,curl)
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+)))
272
273 (define-public python-mpd2
274 (package
275 (name "python-mpd2")
276 (version "0.5.5")
277 (source (origin
278 (method url-fetch)
279 (uri (pypi-uri "python-mpd2" version))
280 (sha256
281 (base32
282 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
283 (build-system python-build-system)
284 (arguments
285 '(#:phases
286 (modify-phases %standard-phases
287 (replace 'check
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+)))
295
296 (define-public python2-mpd2
297 (package-with-python2 python-mpd2))
298
299 (define-public sonata
300 (package
301 (name "sonata")
302 (version "1.7b1")
303 (source (origin
304 (method git-fetch)
305 (uri (git-reference
306 (url "https://github.com/multani/sonata")
307 (commit (string-append "v" version))))
308 (file-name (git-file-name name version))
309 (sha256
310 (base32
311 "1npbxlrg6k154qybfd250nq2p96kxdsdkj9wwnp93gljnii3g8wh"))))
312 (build-system python-build-system)
313 (arguments
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:)
317 (guix build utils))
318 #:imported-modules (,@%gnu-build-system-modules
319 (guix build python-build-system)
320 (guix build glib-or-gtk-build-system))
321 #:phases
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))))
331 #t)))))
332 (native-inputs
333 `(("gettext" ,gettext-minimal)))
334 (inputs
335 `(("python-mpd2" ,python-mpd2)
336 ("gtk+" ,gtk+)
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+)))
347
348 (define-public ashuffle
349 (package
350 (name "ashuffle")
351 (version "2.0.2")
352 (source (origin
353 (method git-fetch)
354 (uri (git-reference
355 (url "https://github.com/joshkunz/ashuffle")
356 (commit (string-append "v" version))))
357 (file-name (git-file-name name version))
358 (sha256
359 (base32
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)))