gnu: sbcl-cl-cffi-gtk: Update to 20200417.
[jackhill/guix/guix.git] / gnu / packages / pulseaudio.scm
CommitLineData
37bfb448 1;;; GNU Guix --- Functional package management for GNU
3246cc91 2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4373278e 3;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
870b9ff9 4;;; Copyright © 2016, 2020 Efraim Flashner <efraim@flashner.co.il>
de1b319d 5;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
3cd959a4 6;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
efc95e7b 7;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
05bdb5e6 8;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
27a976ed 9;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
d5e60a2a 10;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
e2332dec 11;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
c2cf286c 12;;; Copyright © 2020 Amin Bandali <bandali@gnu.org>
37bfb448
LC
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29(define-module (gnu packages pulseaudio)
30 #:use-module (guix packages)
31 #:use-module (guix download)
e2332dec 32 #:use-module (guix git-download)
b5b73a82 33 #:use-module ((guix licenses) #:prefix l:)
5cca1696 34 #:use-module (guix build-system glib-or-gtk)
37bfb448 35 #:use-module (guix build-system gnu)
df71c88c 36 #:use-module (guix build-system python)
b645425f 37 #:use-module (gnu packages)
54ff0b7d 38 #:use-module (gnu packages algebra)
d5e60a2a 39 #:use-module (gnu packages audio)
38cf2ba0 40 #:use-module (gnu packages autotools)
37bfb448 41 #:use-module (gnu packages avahi)
b2a6a784 42 #:use-module (gnu packages boost)
54ff0b7d 43 #:use-module (gnu packages check)
255d1bbe 44 #:use-module (gnu packages dbm)
37bfb448 45 #:use-module (gnu packages glib)
d9e2f7b2 46 #:use-module (gnu packages gnome)
66fb2d23
LC
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages libcanberra)
f6ad09ae 49 #:use-module (gnu packages web)
54ff0b7d 50 #:use-module (gnu packages linux)
37bfb448 51 #:use-module (gnu packages m4)
e2332dec
AG
52 #:use-module (gnu packages protobuf)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages python-xyz)
55 #:use-module (gnu packages python-web)
54ff0b7d 56 #:use-module (gnu packages pkg-config)
531b63eb 57 #:use-module (gnu packages xiph)
55e1475c 58 #:use-module (gnu packages xml)
531b63eb 59 #:use-module (gnu packages xorg))
37bfb448 60
0160458b 61(define-public libsndfile
37bfb448
LC
62 (package
63 (name "libsndfile")
3cd959a4 64 (version "1.0.28")
37bfb448
LC
65 (source (origin
66 (method url-fetch)
67 (uri (string-append "http://www.mega-nerd.com/libsndfile/files/libsndfile-"
68 version ".tar.gz"))
d1a91408
RW
69 (patches (search-patches "libsndfile-armhf-type-checks.patch"
70 "libsndfile-CVE-2017-8361-8363-8365.patch"
1cbdfede
MW
71 "libsndfile-CVE-2017-8362.patch"
72 "libsndfile-CVE-2017-12562.patch"))
37bfb448
LC
73 (sha256
74 (base32
3cd959a4 75 "1afzm7jx34jhqn32clc5xghyjglccam2728yxlx37yj2y0lkkwqz"))))
37bfb448
LC
76 (build-system gnu-build-system)
77 (inputs
78 `(("libvorbis" ,libvorbis)
79 ("libogg" ,libogg)
d7e92b87
ML
80 ("flac" ,flac)))
81 (native-inputs
82 `(("pkg-config" ,pkg-config)))
37bfb448
LC
83 (home-page "http://www.mega-nerd.com/libsndfile/")
84 (synopsis "Reading and writing files containing sampled sound")
85 (description
86 "Libsndfile is a C library for reading and writing files containing
87sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) through
88one standard library interface.
89
90It was designed to handle both little-endian (such as WAV) and
91big-endian (such as AIFF) data, and to compile and run correctly on
92little-endian (such as Intel and DEC/Compaq Alpha) processor systems as well
93as big-endian processor systems such as Motorola 68k, Power PC, MIPS and
94SPARC. Hopefully the design of the library will also make it easy to extend
95for reading and writing new sound file formats.")
96 (license l:gpl2+)))
97
0160458b 98(define-public libsamplerate
37bfb448
LC
99 (package
100 (name "libsamplerate") ; aka. Secret Rabbit Code (SRC)
e1f68c96 101 (version "0.1.9")
37bfb448
LC
102 (source (origin
103 (method url-fetch)
104 (uri (string-append "http://www.mega-nerd.com/SRC/libsamplerate-"
105 version ".tar.gz"))
106 (sha256
107 (base32
e1f68c96 108 "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha"))))
37bfb448 109 (build-system gnu-build-system)
d7e92b87
ML
110 (native-inputs
111 `(("pkg-config" ,pkg-config)))
37bfb448
LC
112 (propagated-inputs
113 `(("libsndfile" ,libsndfile)
114 ("fftw" ,fftw)))
115 (home-page "http://www.mega-nerd.com/SRC/index.html")
116 (synopsis "Audio sample rate conversion library")
117 (description
118 "Secret Rabbit Code (aka. libsamplerate) is a Sample Rate Converter for
119audio. One example of where such a thing would be useful is converting audio
120from the CD sample rate of 44.1kHz to the 48kHz sample rate used by DAT
121players.
122
123SRC is capable of arbitrary and time varying conversions; from downsampling by
124a factor of 256 to upsampling by the same factor. Arbitrary in this case means
125that the ratio of input and output sample rates can be an irrational
126number. The conversion ratio can also vary with time for speeding up and
127slowing down effects.
128
129SRC provides a small set of converters to allow quality to be traded off
130against computation cost. The current best converter provides a
131signal-to-noise ratio of 145dB with -3dB passband extending from DC to 96% of
132the theoretical best bandwidth for a given pair of input and output sample
e881752c 133rates.")
0802f3a0 134 (license l:bsd-2)))
37bfb448 135
0160458b 136(define-public pulseaudio
37bfb448
LC
137 (package
138 (name "pulseaudio")
4442d4dc 139 (version "13.0")
37bfb448
LC
140 (source (origin
141 (method url-fetch)
142 (uri (string-append
9dd61217
EF
143 "https://freedesktop.org/software/pulseaudio/releases/"
144 name "-" version ".tar.xz"))
37bfb448
LC
145 (sha256
146 (base32
4442d4dc 147 "0mw0ybrqj7hvf8lqs5gjzip464hfnixw453lr0mqzlng3b5266wn"))
3f9d63df
LC
148 (modules '((guix build utils)))
149 (snippet
150 ;; Disable console-kit support by default since it's deprecated
151 ;; anyway.
6cbee49d
MW
152 '(begin
153 (substitute* "src/daemon/default.pa.in"
154 (("load-module module-console-kit" all)
155 (string-append "#" all "\n")))
156 #t))
fc1adab1
AK
157 (patches (search-patches
158 "pulseaudio-fix-mult-test.patch"
159 "pulseaudio-longer-test-timeout.patch"))))
37bfb448
LC
160 (build-system gnu-build-system)
161 (arguments
5a74d239
LC
162 `(#:configure-flags (list "--localstatedir=/var" ;"--sysconfdir=/etc"
163 "--disable-oss-output"
de1b319d 164 "--enable-bluez5"
5a74d239
LC
165 (string-append "--with-udev-rules-dir="
166 (assoc-ref %outputs "out")
167 "/lib/udev/rules.d"))
277cf3dc
MB
168 #:phases (modify-phases %standard-phases
169 (add-before 'check 'pre-check
170 (lambda _
171 ;; 'tests/lock-autospawn-test.c' wants to create a file
172 ;; under ~/.config/pulse.
173 (setenv "HOME" (getcwd))
174 ;; 'thread-test' needs more time on hydra and on slower
175 ;; machines, so we set the default timeout to 120 seconds.
176 (setenv "CK_DEFAULT_TIMEOUT" "120")
177 #t)))))
37bfb448
LC
178 (inputs
179 ;; TODO: Add optional inputs (GTK+?).
de1b319d
RW
180 `(("alsa-lib" ,alsa-lib)
181 ("bluez" ,bluez)
182 ("sbc" ,sbc)
7136f3e6 183 ("speexdsp" ,speexdsp)
37bfb448 184 ("libsndfile" ,libsndfile)
d5e60a2a 185 ("jack" ,jack-1) ; For routing the output to jack.
37bfb448
LC
186 ("dbus" ,dbus)
187 ("glib" ,glib)
3246cc91 188 ("libltdl" ,libltdl)
7569c5cb 189 ("fftwf" ,fftwf)
37bfb448 190 ("avahi" ,avahi)
531b63eb
DNB
191
192 ;; For the optional X11 modules.
193 ("libice" ,libice)
194 ("libsm" ,libsm)
195 ("libxcb" ,libxcb)
196 ("libxtst" ,libxtst)
197
7136f3e6 198 ("eudev" ,eudev))) ;for the detection of hardware audio devices
d7e92b87 199 (native-inputs
7136f3e6
MB
200 `(("check" ,check)
201 ("glib:bin" ,glib "bin")
202 ("intltool" ,intltool)
203 ("m4" ,m4)
204 ("pkg-config" ,pkg-config)))
37bfb448
LC
205 (propagated-inputs
206 ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
09767fb5 207 `(("libcap" ,libcap)
37bfb448
LC
208 ("gdbm" ,gdbm)))
209 (home-page "http://www.pulseaudio.org/")
210 (synopsis "Sound server")
211 (description
e881752c
AK
212 "PulseAudio is a sound server. It is basically a proxy for your sound
213applications. It allows you to do advanced operations on your sound data as
214it passes between your application and your hardware. Things like
215transferring the audio to a different machine, changing the sample format or
216channel count and mixing several sounds into one are easily achieved using a
217sound server.")
37bfb448
LC
218
219 ;; PulseAudio is LGPLv2+, but some of the optional dependencies (GNU dbm,
220 ;; FFTW, etc.) are GPL'd, so the result is effectively GPLv2+. See
221 ;; 'LICENSE' for details.
222 (license l:gpl2+)))
66fb2d23
LC
223
224(define-public pavucontrol
225 (package
226 (name "pavucontrol")
08cc159a 227 (version "3.0")
66fb2d23
LC
228 (source (origin
229 (method url-fetch)
230 (uri (string-append
5cc3096c 231 "https://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-"
66fb2d23
LC
232 version
233 ".tar.xz"))
234 (sha256
235 (base32
08cc159a 236 "14486c6lmmirkhscbfygz114f6yzf97h35n3h3pdr27w4mdfmlmk"))))
5cca1696 237 (build-system glib-or-gtk-build-system)
66fb2d23 238 (inputs
5cca1696 239 `(("adwaita-icon-theme" ,adwaita-icon-theme) ;hard-coded theme
66fb2d23 240 ("gtkmm" ,gtkmm)
5cca1696 241 ("libcanberra" ,libcanberra)
c4c4cc05
JD
242 ("pulseaudio" ,pulseaudio)))
243 (native-inputs
244 `(("intltool" ,intltool)
66fb2d23 245 ("pkg-config" ,pkg-config)))
57e7d748 246 (home-page "https://www.freedesktop.org/software/pulseaudio/pavucontrol/")
66fb2d23
LC
247 (synopsis "PulseAudio volume control")
248 (description
249 "PulseAudio Volume Control (pavucontrol) provides a GTK+
250graphical user interface to connect to a PulseAudio server and
251easily control the volume of all clients, sinks, etc.")
252 (license l:gpl2+)))
05bdb5e6
SR
253
254(define-public ponymix
255 (package
256 (name "ponymix")
257 (version "5")
258 (source (origin
870b9ff9
EF
259 (method git-fetch)
260 (uri (git-reference
261 (url "https://github.com/falconindy/ponymix/")
262 (commit version)))
263 (file-name (git-file-name name version))
05bdb5e6
SR
264 (sha256
265 (base32
870b9ff9 266 "08yp7fprmzm6px5yx2rvzri0l60bra5h59l26pn0k071a37ks1rb"))))
05bdb5e6
SR
267 (build-system gnu-build-system)
268 (arguments
269 `(#:tests? #f ; There is no test suite.
270 #:make-flags (let ((out (assoc-ref %outputs "out")))
271 (list (string-append "DESTDIR=" out)))
272 #:phases
273 (modify-phases %standard-phases
274 (add-after 'unpack 'patch-paths
275 (lambda _
276 (substitute* "Makefile"
277 (("/usr") ""))))
278 (delete 'configure)))) ; There's no configure phase.
279 (inputs
280 `(("pulseaudio" ,pulseaudio)))
281 (native-inputs
282 `(("pkg-config" ,pkg-config)))
283 (home-page "https://github.com/falconindy/ponymix")
284 (synopsis "Console-based PulseAudio mixer")
285 (description "Ponymix is a PulseAudio mixer and volume controller with a
286command-line interface. In addition, it is possible to use named sources and
287sinks.")
288 (license l:expat)))
df71c88c
LF
289
290(define-public pulsemixer
291 (package
292 (name "pulsemixer")
a4b4c1aa 293 (version "1.5.0")
df71c88c 294 (source (origin
fa6abb01
EF
295 (method git-fetch)
296 (uri (git-reference
297 (url "https://github.com/GeorgeFilipkin/pulsemixer")
298 (commit version)))
299 (file-name (git-file-name name version))
df71c88c
LF
300 (sha256
301 (base32
a4b4c1aa 302 "162nfpyqn4gp45x332a73n07c118vispz3jicin4p67x3f8f0g3j"))))
df71c88c
LF
303 (build-system python-build-system)
304 (arguments
305 `(#:phases
306 (modify-phases %standard-phases
307 (add-after 'unpack 'patch-path
308 (lambda* (#:key inputs #:allow-other-keys)
309 (let ((pulse (assoc-ref inputs "pulseaudio")))
310 (substitute* "pulsemixer"
311 (("libpulse.so.0")
312 (string-append pulse "/lib/libpulse.so.0")))
313 #t))))))
314 (inputs
315 `(("pulseaudio" ,pulseaudio)))
316 (home-page "https://github.com/GeorgeFilipkin/pulsemixer/")
317 (synopsis "Command-line and curses mixer for PulseAudio")
318 (description "Pulsemixer is a PulseAudio mixer with command-line and
319curses-style interfaces.")
320 (license l:expat)))
e2332dec
AG
321
322(define-public pulseaudio-dlna
323 ;; The last release was in 2016; use a more recent commit.
324 (let ((commit "4472928dd23f274193f14289f59daec411023ab0")
325 (revision "1"))
326 (package
327 (name "pulseaudio-dlna")
328 (version (git-version "0.5.2" revision commit))
329 (source
330 (origin
331 (method git-fetch)
332 (uri (git-reference
333 (url "https://github.com/masmu/pulseaudio-dlna.git")
334 (commit commit)))
335 (file-name (git-file-name name version))
336 (sha256
337 (base32
338 "1dfn7036vrq49kxv4an7rayypnm5dlawsf02pfsldw877hzdamqk"))))
339 (build-system python-build-system)
340 (arguments `(#:python ,python-2))
341 (inputs
342 `(("python2-chardet" ,python2-chardet)
343 ("python2-dbus" ,python2-dbus)
344 ("python2-docopt" ,python2-docopt)
345 ("python2-futures" ,python2-futures)
346 ("python2-pygobject" ,python2-pygobject)
347 ("python2-lxml" ,python2-lxml)
348 ("python2-netifaces" ,python2-netifaces)
349 ("python2-notify2" ,python2-notify2)
350 ("python2-protobuf" ,python2-protobuf)
351 ("python2-psutil" ,python2-psutil)
352 ("python2-requests" ,python2-requests)
353 ("python2-pyroute2" ,python2-pyroute2)
354 ("python2-setproctitle" ,python2-setproctitle)
355 ("python2-zeroconf" ,python2-zeroconf)))
356 (home-page "https://github.com/masmu/pulseaudio-dlna")
357 (synopsis "Stream audio to DLNA/UPnP and Chromecast devices")
358 (description "This lightweight streaming server brings DLNA/UPnP and
359Chromecast support to PulseAudio. It can stream your current PulseAudio
360playback to different UPnP devices (UPnP Media Renderers, including Sonos
361devices and some Smart TVs) or Chromecasts in your network. You should also
362install one or more of the following packages alongside pulseaudio-dlna:
363
364@itemize
365@item ffmpeg - transcoding support for multiple codecs
366@item flac - FLAC transcoding support
367@item lame - MP3 transcoding support
368@item opus-tools - Opus transcoding support
369@item sox - WAV transcoding support
370@item vorbis-tools - Vorbis transcoding support
371@end itemize")
372 (license l:gpl3+))))
b2a6a784
AB
373
374(define-public pamixer
375 (package
376 (name "pamixer")
377 (version "1.4")
378 (source
379 (origin
380 (method git-fetch)
381 (uri (git-reference
382 (url "https://github.com/cdemoulins/pamixer.git")
383 (commit version)))
384 (file-name (git-file-name name version))
385 (sha256
386 (base32 "1i14550n8paijwwnhksv5izgfqm3s5q2773bdfp6vyqybkll55f7"))))
387 (build-system gnu-build-system)
388 (arguments
389 `(#:tests? #f ; There is no test suite.
390 #:make-flags
391 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
392 #:phases
393 (modify-phases %standard-phases
394 (delete 'configure) ; There's no configure phase.
395 (add-before 'install 'mkdir-bin
396 (lambda _
397 (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))
398 #t)))))
399 (inputs
400 `(("boost" ,boost)
401 ("pulseaudio" ,pulseaudio)))
402 (home-page "https://github.com/cdemoulins/pamixer")
403 (synopsis "PulseAudio command line mixer")
404 (description
405 "pamixer is like amixer but for PulseAudio, allowing easy control of the
406volume levels of the sinks (get, set, decrease, increase, toggle mute, etc).")
407 (license l:gpl3+)))
d9e2f7b2
AB
408
409(define-public pasystray
410 (package
411 (name "pasystray")
412 (version "0.7.1")
413 (source
414 (origin
415 (method git-fetch)
416 (uri (git-reference
417 (url "https://github.com/christophgysin/pasystray.git")
418 (commit (string-append name "-" version))))
419 (file-name (git-file-name name version))
420 (sha256
421 (base32 "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk"))))
422 (build-system gnu-build-system)
423 (arguments
424 `(#:phases
425 (modify-phases %standard-phases
426 (add-before 'bootstrap 'remove-bootstrap.sh
427 (lambda _
428 ;; Interferes with the bootstrap phase.
429 (delete-file "bootstrap.sh")
430 #t)))))
431 (native-inputs
432 `(("autoconf" ,autoconf)
433 ("automake" ,automake)
434 ("pkg-config" ,pkg-config)))
435 (inputs
436 `(("avahi" ,avahi)
437 ("gtk+" ,gtk+)
438 ("libnotify" ,libnotify)
439 ("libx11" ,libx11)
440 ("pulseaudio" ,pulseaudio)))
441 (home-page "https://github.com/christophgysin/pasystray")
442 (synopsis "PulseAudio controller for the system tray")
443 (description "@command{pasystray} enables control of various
444PulseAudio server settings from the X11 system tray. See the project
445README.md for a detailed list of features.")
446 (license l:lgpl2.1+)))