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