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