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