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 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages mpd)
26 #:use-module (gnu packages)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix utils)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system meson)
33 #:use-module (guix build-system python)
34 #:use-module (gnu packages avahi)
35 #:use-module (gnu packages boost)
36 #:use-module (gnu packages gettext)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages icu4c)
40 #:use-module (gnu packages readline)
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages curl)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages mp3)
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages pcre)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages pulseaudio)
53 #:use-module (gnu packages sphinx)
54 #:use-module (gnu packages sqlite)
55 #:use-module (gnu packages video)
56 #:use-module (gnu packages xiph))
57
58 (define-public libmpdclient
59 (package
60 (name "libmpdclient")
61 (version "2.16")
62 (source (origin
63 (method url-fetch)
64 (uri
65 (string-append "https://musicpd.org/download/libmpdclient/"
66 (car (string-split version #\.))
67 "/libmpdclient-" version ".tar.xz"))
68 (sha256
69 (base32
70 "0r24cl3i9nvs6a47mvwaxk1kb5wmnhkhrw1q5cq9010fgjvdlszs"))))
71 (build-system meson-build-system)
72 (native-inputs
73 `(("pkg-config" ,pkg-config)
74
75 ;; For building HTML documentation.
76 ("doxygen" ,doxygen)
77
78 ;; For tests.
79 ("check" ,check)))
80 (arguments
81 `(#:configure-flags
82 (list "-Ddocumentation=true"
83 "-Dtest=true")))
84 (synopsis "Music Player Daemon client library")
85 (description "A stable, documented, asynchronous API library for
86 interfacing MPD in the C, C++ & Objective C languages.")
87 (home-page "https://www.musicpd.org/libs/libmpdclient/")
88 (license license:bsd-3)))
89
90 (define-public mpd
91 (package
92 (name "mpd")
93 (version "0.21.14")
94 (source (origin
95 (method url-fetch)
96 (uri
97 (string-append "https://musicpd.org/download/mpd/"
98 (version-major+minor version)
99 "/mpd-" version ".tar.xz"))
100 (sha256
101 (base32
102 "0iknnm9xvwfgk8h82hjwrmbijpk9l0dgap0794c2nyg8i66qlb0y"))))
103 (build-system meson-build-system)
104 (arguments
105 `(#:configure-flags '("-Ddocumentation=true"))) ;the default is 'false'...
106 (inputs `(("ao" ,ao)
107 ("alsa-lib" ,alsa-lib)
108 ("avahi" ,avahi)
109 ("boost" ,boost)
110 ("curl" ,curl)
111 ("ffmpeg" ,ffmpeg)
112 ("flac" ,flac)
113 ("glib" ,glib)
114 ("icu4c" ,icu4c)
115 ;; The LAME decoder comes from FFmpeg, but is added here so that
116 ;; configure picks up the LAME encoder.
117 ("lame" ,lame)
118 ("libid3tag" ,libid3tag)
119 ("libmpdclient" ,libmpdclient)
120 ("libsamplerate" ,libsamplerate)
121 ("libsndfile" ,libsndfile)
122 ("libvorbis" ,libvorbis)
123 ("opus" ,opus)
124 ("pulseaudio" ,pulseaudio)
125 ("sqlite" ,sqlite)
126 ("zlib" ,zlib)))
127 (native-inputs `(("pkg-config" ,pkg-config)
128 ("python-sphinx" ,python-sphinx)))
129 ;; Missing optional inputs:
130 ;; libyajl
131 ;; libcdio_paranoia
132 ;; libmms
133 ;; libadplug
134 ;; libaudiofile
135 ;; faad2
136 ;; fluidsynth
137 ;; libgme
138 ;; libshout
139 ;; libmpg123
140 ;; libmodplug
141 ;; libmpcdec
142 ;; libsidplay2
143 ;; libwavpack
144 ;; libwildmidi
145 ;; libtwolame
146 ;; libroar
147 ;; libjack
148 ;; OpenAL
149 (synopsis "Music Player Daemon")
150 (description "Music Player Daemon (MPD) is a flexible, powerful,
151 server-side application for playing music. Through plugins and libraries it
152 can play a variety of sound files while being controlled by its network
153 protocol.")
154 (home-page "https://www.musicpd.org/")
155 (license license:gpl2)))
156
157 (define-public mpd-mpc
158 (package
159 (name "mpd-mpc")
160 (version "0.32")
161 (source (origin
162 (method url-fetch)
163 (uri
164 (string-append "https://www.musicpd.org/download/mpc/"
165 (car (string-split version #\.))
166 "/mpc-" version ".tar.xz"))
167 (sha256
168 (base32
169 "1irilgz64pny7b8zygy5i74nfmlhgsawz0djx9mrj6g0gidxjqbr"))))
170 (build-system meson-build-system)
171 (inputs `(("libmpdclient" ,libmpdclient)))
172 (native-inputs
173 `(("pkg-config" ,pkg-config)
174 ("python-sphinx" ,python-sphinx)))
175 (synopsis "Music Player Daemon client")
176 (description "MPC is a minimalist command line interface to MPD, the music
177 player daemon.")
178 (home-page "https://www.musicpd.org/clients/mpc/")
179 (license license:gpl2)))
180
181 (define-public ncmpc
182 (package
183 (name "ncmpc")
184 (version "0.35")
185 (source (origin
186 (method url-fetch)
187 (uri
188 (string-append "http://musicpd.org/download/ncmpc/"
189 (version-major version)
190 "/ncmpc-" version ".tar.xz"))
191 (sha256
192 (base32
193 "0hfjvm1p0z7x6gfn5xhl5c0jsmidvz0qfl04pq45x4chh9iiwkxx"))))
194 (build-system meson-build-system)
195 (arguments
196 `(#:configure-flags
197 ;; Otherwise, they are installed incorrectly, in
198 ;; '$out/share/man/man/man1'.
199 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
200 "/share"))))
201 (inputs `(("boost" ,boost)
202 ("pcre" ,pcre)
203 ("libmpdclient" ,libmpdclient)
204 ("ncurses" ,ncurses)))
205 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
206 ("pkg-config" ,pkg-config)
207 ("python-sphinx" ,python-sphinx)))
208 (synopsis "Curses Music Player Daemon client")
209 (description "ncmpc is a fully featured MPD client, which runs in a
210 terminal using ncurses.")
211 (home-page "https://www.musicpd.org/clients/ncmpc/")
212 (license license:gpl2)))
213
214 (define-public ncmpcpp
215 (package
216 (name "ncmpcpp")
217 (version "0.8.2")
218 (source (origin
219 (method url-fetch)
220 (uri
221 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
222 version ".tar.bz2"))
223 (sha256
224 (base32
225 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
226 (build-system gnu-build-system)
227 (inputs `(("libmpdclient" ,libmpdclient)
228 ("boost" ,boost)
229 ("readline" ,readline)
230 ("ncurses" ,ncurses)
231 ("taglib" ,taglib)
232 ("icu4c" ,icu4c)
233 ("curl" ,curl)))
234 (native-inputs
235 `(("pkg-config" ,pkg-config)))
236 (arguments
237 '(#:configure-flags
238 '("BOOST_LIB_SUFFIX=" "--with-taglib")))
239 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
240 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
241 but it provides new useful features such as support for regular expressions
242 for library searches, extended song format, items filtering, the ability to
243 sort playlists, and a local file system browser.")
244 (home-page "https://ncmpcpp.rybczak.net/")
245 (license license:gpl2+)))
246
247 (define-public mpdscribble
248 (package
249 (name "mpdscribble")
250 (version "0.22")
251 (source (origin
252 (method url-fetch)
253 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
254 version "/mpdscribble-" version ".tar.gz"))
255 (sha256
256 (base32
257 "0f0ybx380x2z2g1qvdndpvcrhkrgsfqckhz3ryydq2w3pl12v27z"))))
258 (build-system gnu-build-system)
259 (inputs `(("libmpdclient" ,libmpdclient)
260 ("curl" ,curl)
261 ("glib" ,glib)))
262 (native-inputs `(("pkg-config" ,pkg-config)))
263 (synopsis "MPD client for track scrobbling")
264 (description "mpdscribble is a Music Player Daemon client which submits
265 information about tracks being played to a scrobbler, such as Libre.FM.")
266 (home-page "https://www.musicpd.org/clients/mpdscribble/")
267 (license license:gpl2+)))
268
269 (define-public python-mpd2
270 (package
271 (name "python-mpd2")
272 (version "0.5.5")
273 (source (origin
274 (method url-fetch)
275 (uri (pypi-uri "python-mpd2" version))
276 (sha256
277 (base32
278 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
279 (build-system python-build-system)
280 (arguments
281 '(#:phases
282 (modify-phases %standard-phases
283 (replace 'check
284 (lambda _ (invoke "python" "mpd_test.py"))))))
285 (native-inputs `(("python-mock" ,python-mock)))
286 (home-page "https://github.com/Mic92/python-mpd2")
287 (synopsis "Python MPD client library")
288 (description "Python-mpd2 is a Python library which provides a client
289 interface for the Music Player Daemon.")
290 (license license:lgpl3+)))
291
292 (define-public python2-mpd2
293 (package-with-python2 python-mpd2))
294
295 (define-public sonata
296 (package
297 (name "sonata")
298 (version "1.7b1")
299 (source (origin
300 (method url-fetch)
301 (uri
302 (string-append "https://github.com/multani/sonata/archive/v"
303 version ".tar.gz"))
304 (file-name (string-append name "-" version ".tar.gz"))
305 (sha256
306 (base32
307 "07gq2nxqwxs0qyxjbay7k5j25zd386bn7wdr2dl1gk53diwnn7s0"))))
308 (build-system python-build-system)
309 (arguments
310 `(#:modules ((guix build gnu-build-system)
311 (guix build python-build-system)
312 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
313 (guix build utils))
314 #:imported-modules (,@%gnu-build-system-modules
315 (guix build python-build-system)
316 (guix build glib-or-gtk-build-system))
317 #:phases
318 (modify-phases %standard-phases
319 (add-after 'install 'glib-or-gtk-wrap
320 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
321 (add-after 'install 'wrap-sonata
322 (lambda* (#:key outputs #:allow-other-keys)
323 (let ((out (assoc-ref outputs "out"))
324 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
325 (wrap-program (string-append out "/bin/sonata")
326 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
327 #t)))))
328 (native-inputs
329 `(("gettext" ,gettext-minimal)))
330 (inputs
331 `(("python-mpd2" ,python-mpd2)
332 ("gtk+" ,gtk+)
333 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
334 ("gobject-introspection" ,gobject-introspection)
335 ("adwaita-icon-theme" ,adwaita-icon-theme)
336 ("python-pygobject" ,python-pygobject)))
337 (synopsis "Elegant client for the Music Player Daemon")
338 (description "Sonata is an elegant graphical client for the Music Player
339 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
340 MPD servers, search and multimedia key support.")
341 (home-page "https://www.nongnu.org/sonata/")
342 (license license:gpl3+)))