gnu: ruby-pandoc-ruby: Use pandoc instead of ghc-pandoc.
[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 gtk)
41 #:use-module (gnu packages icu4c)
42 #:use-module (gnu packages readline)
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages linux)
49 #:use-module (gnu packages mp3)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages pcre)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages pulseaudio)
55 #:use-module (gnu packages sphinx)
56 #:use-module (gnu packages sqlite)
57 #:use-module (gnu packages video)
58 #:use-module (gnu packages xiph))
59
60 (define-public libmpdclient
61 (package
62 (name "libmpdclient")
63 (version "2.19")
64 (source (origin
65 (method url-fetch)
66 (uri
67 (string-append "https://musicpd.org/download/libmpdclient/"
68 (car (string-split version #\.))
69 "/libmpdclient-" version ".tar.xz"))
70 (sha256
71 (base32
72 "12d1fzlkcnjw4ayk2wp11vhglfcvr5k02arzdbkhiavq496av2hm"))))
73 (build-system meson-build-system)
74 (native-inputs
75 `(("pkg-config" ,pkg-config)
76
77 ;; For building HTML documentation.
78 ("doxygen" ,doxygen)
79
80 ;; For tests.
81 ("check" ,check)))
82 (arguments
83 `(#:configure-flags
84 (list "-Ddocumentation=true"
85 "-Dtest=true")))
86 (synopsis "Music Player Daemon client library")
87 (description "A stable, documented, asynchronous API library for
88 interfacing MPD in the C, C++ & Objective C languages.")
89 (home-page "https://www.musicpd.org/libs/libmpdclient/")
90 (license license:bsd-3)))
91
92 (define-public mpd
93 (package
94 (name "mpd")
95 (version "0.21.25")
96 (source (origin
97 (method url-fetch)
98 (uri
99 (string-append "https://musicpd.org/download/mpd/"
100 (version-major+minor version)
101 "/mpd-" version ".tar.xz"))
102 (sha256
103 (base32
104 "00f2cm3sg0vi9gxb1yk35lyyh3fbabwim3mfnsz2syrjpw0sv810"))))
105 (build-system meson-build-system)
106 (arguments
107 `(#:configure-flags '("-Ddocumentation=true"))) ;the default is 'false'...
108 (inputs `(("ao" ,ao)
109 ("alsa-lib" ,alsa-lib)
110 ("avahi" ,avahi)
111 ("boost" ,boost)
112 ("curl" ,curl)
113 ("ffmpeg" ,ffmpeg)
114 ("flac" ,flac)
115 ("glib" ,glib)
116 ("icu4c" ,icu4c)
117 ;; The LAME decoder comes from FFmpeg, but is added here so that
118 ;; configure picks up the LAME encoder.
119 ("lame" ,lame)
120 ("libid3tag" ,libid3tag)
121 ("libmpdclient" ,libmpdclient)
122 ("libsamplerate" ,libsamplerate)
123 ("libsndfile" ,libsndfile)
124 ("libvorbis" ,libvorbis)
125 ("opus" ,opus)
126 ("pulseaudio" ,pulseaudio)
127 ("sqlite" ,sqlite)
128 ("zlib" ,zlib)))
129 (native-inputs `(("pkg-config" ,pkg-config)
130 ("python-sphinx" ,python-sphinx)))
131 ;; Missing optional inputs:
132 ;; libyajl
133 ;; libcdio_paranoia
134 ;; libmms
135 ;; libadplug
136 ;; libaudiofile
137 ;; faad2
138 ;; fluidsynth
139 ;; libgme
140 ;; libshout
141 ;; libmpg123
142 ;; libmodplug
143 ;; libmpcdec
144 ;; libsidplay2
145 ;; libwavpack
146 ;; libwildmidi
147 ;; libtwolame
148 ;; libroar
149 ;; libjack
150 ;; OpenAL
151 (synopsis "Music Player Daemon")
152 (description "Music Player Daemon (MPD) is a flexible, powerful,
153 server-side application for playing music. Through plugins and libraries it
154 can play a variety of sound files while being controlled by its network
155 protocol.")
156 (home-page "https://www.musicpd.org/")
157 (license license:gpl2)))
158
159 (define-public mpd-mpc
160 (package
161 (name "mpd-mpc")
162 (version "0.33")
163 (source (origin
164 (method url-fetch)
165 (uri
166 (string-append "https://www.musicpd.org/download/mpc/"
167 (car (string-split version #\.))
168 "/mpc-" version ".tar.xz"))
169 (sha256
170 (base32
171 "15hjpzqs83v1zx49x8nkpwy9hpl1jxd55z1w50vm82gm32zcqh2g"))))
172 (build-system meson-build-system)
173 (inputs `(("libmpdclient" ,libmpdclient)))
174 (native-inputs
175 `(("pkg-config" ,pkg-config)
176 ("python-sphinx" ,python-sphinx)))
177 (synopsis "Music Player Daemon client")
178 (description "MPC is a minimalist command line interface to MPD, the music
179 player daemon.")
180 (home-page "https://www.musicpd.org/clients/mpc/")
181 (license license:gpl2)))
182
183 (define-public ncmpc
184 (package
185 (name "ncmpc")
186 (version "0.39")
187 (source (origin
188 (method url-fetch)
189 (uri
190 (string-append "http://musicpd.org/download/ncmpc/"
191 (version-major version)
192 "/ncmpc-" version ".tar.xz"))
193 (sha256
194 (base32
195 "1a0i1wm9287kd4nqii28dp84260063kyl726yjzxzr7vq8hf7sv4"))))
196 (build-system meson-build-system)
197 (arguments
198 `(#:configure-flags
199 ;; Otherwise, they are installed incorrectly, in
200 ;; '$out/share/man/man/man1'.
201 (list (string-append "-Dmandir=" (assoc-ref %outputs "out")
202 "/share"))))
203 (inputs `(("boost" ,boost)
204 ("pcre" ,pcre)
205 ("libmpdclient" ,libmpdclient)
206 ("ncurses" ,ncurses)))
207 (native-inputs `(("gettext" ,gettext-minimal) ; for xgettext
208 ("pkg-config" ,pkg-config)
209 ("python-sphinx" ,python-sphinx)))
210 (synopsis "Curses Music Player Daemon client")
211 (description "ncmpc is a fully featured MPD client, which runs in a
212 terminal using ncurses.")
213 (home-page "https://www.musicpd.org/clients/ncmpc/")
214 (license license:gpl2)))
215
216 (define-public ncmpcpp
217 (package
218 (name "ncmpcpp")
219 (version "0.8.2")
220 (source (origin
221 (method url-fetch)
222 (uri
223 (string-append "https://ncmpcpp.rybczak.net/stable/ncmpcpp-"
224 version ".tar.bz2"))
225 (sha256
226 (base32
227 "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5"))))
228 (build-system gnu-build-system)
229 (inputs `(("libmpdclient" ,libmpdclient)
230 ("boost" ,boost)
231 ("readline" ,readline)
232 ("ncurses" ,ncurses)
233 ("taglib" ,taglib)
234 ("icu4c" ,icu4c)
235 ("curl" ,curl)))
236 (native-inputs
237 `(("pkg-config" ,pkg-config)))
238 (arguments
239 '(#:configure-flags
240 '("BOOST_LIB_SUFFIX=" "--with-taglib" "--enable-clock")))
241 (synopsis "Featureful ncurses based MPD client inspired by ncmpc")
242 (description "Ncmpcpp is an mpd client with a UI very similar to ncmpc,
243 but it provides new useful features such as support for regular expressions
244 for library searches, extended song format, items filtering, the ability to
245 sort playlists, and a local file system browser.")
246 (home-page "https://ncmpcpp.rybczak.net/")
247 (license license:gpl2+)))
248
249 (define-public mpdscribble
250 (package
251 (name "mpdscribble")
252 (version "0.22")
253 (source (origin
254 (method url-fetch)
255 (uri (string-append "http://www.musicpd.org/download/mpdscribble/"
256 version "/mpdscribble-" version ".tar.gz"))
257 (sha256
258 (base32
259 "0f0ybx380x2z2g1qvdndpvcrhkrgsfqckhz3ryydq2w3pl12v27z"))))
260 (build-system gnu-build-system)
261 (inputs `(("libmpdclient" ,libmpdclient)
262 ("curl" ,curl)
263 ("glib" ,glib)))
264 (native-inputs `(("pkg-config" ,pkg-config)))
265 (synopsis "MPD client for track scrobbling")
266 (description "mpdscribble is a Music Player Daemon client which submits
267 information about tracks being played to a scrobbler, such as Libre.FM.")
268 (home-page "https://www.musicpd.org/clients/mpdscribble/")
269 (license license:gpl2+)))
270
271 (define-public python-mpd2
272 (package
273 (name "python-mpd2")
274 (version "0.5.5")
275 (source (origin
276 (method url-fetch)
277 (uri (pypi-uri "python-mpd2" version))
278 (sha256
279 (base32
280 "0laypd7h1j14b4vrmiayqlzdsh2j5hc3zv4l0fqvbrbw9y6763ii"))))
281 (build-system python-build-system)
282 (arguments
283 '(#:phases
284 (modify-phases %standard-phases
285 (replace 'check
286 (lambda _ (invoke "python" "mpd_test.py"))))))
287 (native-inputs `(("python-mock" ,python-mock)))
288 (home-page "https://github.com/Mic92/python-mpd2")
289 (synopsis "Python MPD client library")
290 (description "Python-mpd2 is a Python library which provides a client
291 interface for the Music Player Daemon.")
292 (license license:lgpl3+)))
293
294 (define-public python2-mpd2
295 (package-with-python2 python-mpd2))
296
297 (define-public sonata
298 (package
299 (name "sonata")
300 (version "1.7b1")
301 (source (origin
302 (method git-fetch)
303 (uri (git-reference
304 (url "https://github.com/multani/sonata")
305 (commit (string-append "v" version))))
306 (file-name (git-file-name name version))
307 (sha256
308 (base32
309 "1npbxlrg6k154qybfd250nq2p96kxdsdkj9wwnp93gljnii3g8wh"))))
310 (build-system python-build-system)
311 (arguments
312 `(#:modules ((guix build gnu-build-system)
313 (guix build python-build-system)
314 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
315 (guix build utils))
316 #:imported-modules (,@%gnu-build-system-modules
317 (guix build python-build-system)
318 (guix build glib-or-gtk-build-system))
319 #:phases
320 (modify-phases %standard-phases
321 (add-after 'install 'glib-or-gtk-wrap
322 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
323 (add-after 'install 'wrap-sonata
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let ((out (assoc-ref outputs "out"))
326 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
327 (wrap-program (string-append out "/bin/sonata")
328 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
329 #t)))))
330 (native-inputs
331 `(("gettext" ,gettext-minimal)))
332 (inputs
333 `(("python-mpd2" ,python-mpd2)
334 ("gtk+" ,gtk+)
335 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
336 ("gobject-introspection" ,gobject-introspection)
337 ("adwaita-icon-theme" ,adwaita-icon-theme)
338 ("python-pygobject" ,python-pygobject)))
339 (synopsis "Elegant client for the Music Player Daemon")
340 (description "Sonata is an elegant graphical client for the Music Player
341 Daemon (MPD). It supports playlists, multiple profiles (connecting to different
342 MPD servers, search and multimedia key support.")
343 (home-page "https://www.nongnu.org/sonata/")
344 (license license:gpl3+)))
345
346 (define-public ashuffle
347 (package
348 (name "ashuffle")
349 (version "2.0.2")
350 (source (origin
351 (method git-fetch)
352 (uri (git-reference
353 (url "https://github.com/joshkunz/ashuffle")
354 (commit (string-append "v" version))))
355 (file-name (git-file-name name version))
356 (sha256
357 (base32
358 "11aa95cg0yca2m2d00sar6wr14g3lc7cfm9bin1h7lk7asdm8azp"))))
359 (native-inputs `(("pkg-config" ,pkg-config)))
360 (inputs `(("libmpdclient" ,libmpdclient)))
361 (build-system meson-build-system)
362 (home-page "https://github.com/joshkunz/ashuffle")
363 (synopsis "Automatic library-wide shuffle for mpd")
364 (description "ashuffle is an application for automatically shuffling your
365 MPD library in a similar way to many other music players' 'shuffle library'
366 feature. ashuffle works like any other MPD client, and can be used alongside
367 other MPD frontends.")
368 (license license:expat)))