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