gnu: pulseaudio: Update to 11.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>
9dd61217 4;;; Copyright © 2016 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>
37bfb448
LC
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 pulseaudio)
26 #:use-module (guix packages)
27 #:use-module (guix download)
b5b73a82 28 #:use-module ((guix licenses) #:prefix l:)
37bfb448 29 #:use-module (guix build-system gnu)
df71c88c 30 #:use-module (guix build-system python)
b645425f 31 #:use-module (gnu packages)
54ff0b7d 32 #:use-module (gnu packages algebra)
38cf2ba0 33 #:use-module (gnu packages autotools)
37bfb448 34 #:use-module (gnu packages avahi)
54ff0b7d 35 #:use-module (gnu packages check)
b416aadf 36 #:use-module (gnu packages databases)
37bfb448 37 #:use-module (gnu packages glib)
66fb2d23
LC
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages libcanberra)
f6ad09ae 40 #:use-module (gnu packages web)
54ff0b7d 41 #:use-module (gnu packages linux)
37bfb448 42 #:use-module (gnu packages m4)
54ff0b7d 43 #:use-module (gnu packages pkg-config)
0160458b 44 #:use-module (gnu packages xiph))
37bfb448 45
0160458b 46(define-public libsndfile
37bfb448
LC
47 (package
48 (name "libsndfile")
3cd959a4 49 (version "1.0.28")
37bfb448
LC
50 (source (origin
51 (method url-fetch)
52 (uri (string-append "http://www.mega-nerd.com/libsndfile/files/libsndfile-"
53 version ".tar.gz"))
d1a91408
RW
54 (patches (search-patches "libsndfile-armhf-type-checks.patch"
55 "libsndfile-CVE-2017-8361-8363-8365.patch"
56 "libsndfile-CVE-2017-8362.patch"))
37bfb448
LC
57 (sha256
58 (base32
3cd959a4 59 "1afzm7jx34jhqn32clc5xghyjglccam2728yxlx37yj2y0lkkwqz"))))
37bfb448
LC
60 (build-system gnu-build-system)
61 (inputs
62 `(("libvorbis" ,libvorbis)
63 ("libogg" ,libogg)
d7e92b87
ML
64 ("flac" ,flac)))
65 (native-inputs
66 `(("pkg-config" ,pkg-config)))
37bfb448
LC
67 (home-page "http://www.mega-nerd.com/libsndfile/")
68 (synopsis "Reading and writing files containing sampled sound")
69 (description
70 "Libsndfile is a C library for reading and writing files containing
71sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) through
72one standard library interface.
73
74It was designed to handle both little-endian (such as WAV) and
75big-endian (such as AIFF) data, and to compile and run correctly on
76little-endian (such as Intel and DEC/Compaq Alpha) processor systems as well
77as big-endian processor systems such as Motorola 68k, Power PC, MIPS and
78SPARC. Hopefully the design of the library will also make it easy to extend
79for reading and writing new sound file formats.")
80 (license l:gpl2+)))
81
0160458b 82(define-public libsamplerate
37bfb448
LC
83 (package
84 (name "libsamplerate") ; aka. Secret Rabbit Code (SRC)
e1f68c96 85 (version "0.1.9")
37bfb448
LC
86 (source (origin
87 (method url-fetch)
88 (uri (string-append "http://www.mega-nerd.com/SRC/libsamplerate-"
89 version ".tar.gz"))
90 (sha256
91 (base32
e1f68c96 92 "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha"))))
37bfb448 93 (build-system gnu-build-system)
d7e92b87
ML
94 (native-inputs
95 `(("pkg-config" ,pkg-config)))
37bfb448
LC
96 (propagated-inputs
97 `(("libsndfile" ,libsndfile)
98 ("fftw" ,fftw)))
99 (home-page "http://www.mega-nerd.com/SRC/index.html")
100 (synopsis "Audio sample rate conversion library")
101 (description
102 "Secret Rabbit Code (aka. libsamplerate) is a Sample Rate Converter for
103audio. One example of where such a thing would be useful is converting audio
104from the CD sample rate of 44.1kHz to the 48kHz sample rate used by DAT
105players.
106
107SRC is capable of arbitrary and time varying conversions; from downsampling by
108a factor of 256 to upsampling by the same factor. Arbitrary in this case means
109that the ratio of input and output sample rates can be an irrational
110number. The conversion ratio can also vary with time for speeding up and
111slowing down effects.
112
113SRC provides a small set of converters to allow quality to be traded off
114against computation cost. The current best converter provides a
115signal-to-noise ratio of 145dB with -3dB passband extending from DC to 96% of
116the theoretical best bandwidth for a given pair of input and output sample
e881752c 117rates.")
0802f3a0 118 (license l:bsd-2)))
37bfb448 119
0160458b 120(define-public pulseaudio
37bfb448
LC
121 (package
122 (name "pulseaudio")
2edf8259 123 (version "11.1")
37bfb448
LC
124 (source (origin
125 (method url-fetch)
126 (uri (string-append
9dd61217
EF
127 "https://freedesktop.org/software/pulseaudio/releases/"
128 name "-" version ".tar.xz"))
37bfb448
LC
129 (sha256
130 (base32
2edf8259 131 "17ndr6kc7hpv4ih4gygwlcpviqifbkvnk4fbwf4n25kpb991qlpj"))
3f9d63df
LC
132 (modules '((guix build utils)))
133 (snippet
134 ;; Disable console-kit support by default since it's deprecated
135 ;; anyway.
136 '(substitute* "src/daemon/default.pa.in"
137 (("load-module module-console-kit" all)
1d1efa6c 138 (string-append "#" all "\n"))))
fc1adab1
AK
139 (patches (search-patches
140 "pulseaudio-fix-mult-test.patch"
141 "pulseaudio-longer-test-timeout.patch"))))
37bfb448
LC
142 (build-system gnu-build-system)
143 (arguments
5a74d239
LC
144 `(#:configure-flags (list "--localstatedir=/var" ;"--sysconfdir=/etc"
145 "--disable-oss-output"
de1b319d 146 "--enable-bluez5"
5a74d239
LC
147 (string-append "--with-udev-rules-dir="
148 (assoc-ref %outputs "out")
149 "/lib/udev/rules.d"))
37bfb448
LC
150 #:phases (alist-cons-before
151 'check 'pre-check
152 (lambda _
153 ;; 'tests/lock-autospawn-test.c' wants to create a file
154 ;; under ~/.config/pulse.
b0364911
MW
155 (setenv "HOME" (getcwd))
156 ;; 'thread-test' needs more time on hydra and on slower
157 ;; machines, so we set the default timeout to 120 seconds.
158 (setenv "CK_DEFAULT_TIMEOUT" "120"))
f5ac2352 159 %standard-phases)))
37bfb448
LC
160 (inputs
161 ;; TODO: Add optional inputs (GTK+?).
de1b319d
RW
162 `(("alsa-lib" ,alsa-lib)
163 ("bluez" ,bluez)
164 ("sbc" ,sbc)
37bfb448
LC
165 ("speex" ,speex)
166 ("libsndfile" ,libsndfile)
167 ("libsamplerate" ,libsamplerate)
168 ("dbus" ,dbus)
169 ("glib" ,glib)
170 ("intltool" ,intltool)
37bfb448 171 ("m4" ,m4)
3246cc91 172 ("libltdl" ,libltdl)
7569c5cb 173 ("fftwf" ,fftwf)
37bfb448 174 ("avahi" ,avahi)
5a74d239 175 ("eudev" ,eudev) ;for the detection of hardware audio devices
37bfb448 176 ("check" ,check)))
d7e92b87
ML
177 (native-inputs
178 `(("pkg-config" ,pkg-config)))
37bfb448
LC
179 (propagated-inputs
180 ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
09767fb5 181 `(("libcap" ,libcap)
37bfb448
LC
182 ("gdbm" ,gdbm)))
183 (home-page "http://www.pulseaudio.org/")
184 (synopsis "Sound server")
185 (description
e881752c
AK
186 "PulseAudio is a sound server. It is basically a proxy for your sound
187applications. It allows you to do advanced operations on your sound data as
188it passes between your application and your hardware. Things like
189transferring the audio to a different machine, changing the sample format or
190channel count and mixing several sounds into one are easily achieved using a
191sound server.")
37bfb448
LC
192
193 ;; PulseAudio is LGPLv2+, but some of the optional dependencies (GNU dbm,
194 ;; FFTW, etc.) are GPL'd, so the result is effectively GPLv2+. See
195 ;; 'LICENSE' for details.
196 (license l:gpl2+)))
66fb2d23
LC
197
198(define-public pavucontrol
199 (package
200 (name "pavucontrol")
08cc159a 201 (version "3.0")
66fb2d23
LC
202 (source (origin
203 (method url-fetch)
204 (uri (string-append
5cc3096c 205 "https://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-"
66fb2d23
LC
206 version
207 ".tar.xz"))
208 (sha256
209 (base32
08cc159a 210 "14486c6lmmirkhscbfygz114f6yzf97h35n3h3pdr27w4mdfmlmk"))))
66fb2d23 211 (build-system gnu-build-system)
d8c317df
SB
212 (arguments
213 '(#:configure-flags '("CXXFLAGS=-std=c++11"))) ; required by gtkmm
66fb2d23 214 (inputs
c4c4cc05 215 `(("libcanberra" ,libcanberra)
66fb2d23 216 ("gtkmm" ,gtkmm)
c4c4cc05
JD
217 ("pulseaudio" ,pulseaudio)))
218 (native-inputs
219 `(("intltool" ,intltool)
66fb2d23
LC
220 ("pkg-config" ,pkg-config)))
221 (home-page "http://freedesktop.org/software/pulseaudio/pavucontrol/")
222 (synopsis "PulseAudio volume control")
223 (description
224 "PulseAudio Volume Control (pavucontrol) provides a GTK+
225graphical user interface to connect to a PulseAudio server and
226easily control the volume of all clients, sinks, etc.")
227 (license l:gpl2+)))
05bdb5e6
SR
228
229(define-public ponymix
230 (package
231 (name "ponymix")
232 (version "5")
233 (source (origin
234 (method url-fetch)
235 (uri (string-append "https://github.com/falconindy/ponymix/"
236 "archive/" version ".tar.gz"))
237 (sha256
238 (base32
239 "1c0ch98zry3c4ixywwynjid1n1nh4xl4l1p548giq2w3zwflaghn"))
240 (file-name (string-append name "-" version ".tar.gz"))))
241 (build-system gnu-build-system)
242 (arguments
243 `(#:tests? #f ; There is no test suite.
244 #:make-flags (let ((out (assoc-ref %outputs "out")))
245 (list (string-append "DESTDIR=" out)))
246 #:phases
247 (modify-phases %standard-phases
248 (add-after 'unpack 'patch-paths
249 (lambda _
250 (substitute* "Makefile"
251 (("/usr") ""))))
252 (delete 'configure)))) ; There's no configure phase.
253 (inputs
254 `(("pulseaudio" ,pulseaudio)))
255 (native-inputs
256 `(("pkg-config" ,pkg-config)))
257 (home-page "https://github.com/falconindy/ponymix")
258 (synopsis "Console-based PulseAudio mixer")
259 (description "Ponymix is a PulseAudio mixer and volume controller with a
260command-line interface. In addition, it is possible to use named sources and
261sinks.")
262 (license l:expat)))
df71c88c
LF
263
264(define-public pulsemixer
265 (package
266 (name "pulsemixer")
267 (version "1.3.0")
268 (source (origin
269 (method url-fetch)
270 (uri (string-append "https://github.com/GeorgeFilipkin/"
271 "pulsemixer/archive/" version ".tar.gz"))
272 (sha256
273 (base32
274 "03c94313fhxd5sbkl2ajzb2gmmm4hpv7m5rkbxmahwg9s8ih824r"))))
275 (build-system python-build-system)
276 (arguments
277 `(#:phases
278 (modify-phases %standard-phases
279 (add-after 'unpack 'patch-path
280 (lambda* (#:key inputs #:allow-other-keys)
281 (let ((pulse (assoc-ref inputs "pulseaudio")))
282 (substitute* "pulsemixer"
283 (("libpulse.so.0")
284 (string-append pulse "/lib/libpulse.so.0")))
285 #t))))))
286 (inputs
287 `(("pulseaudio" ,pulseaudio)))
288 (home-page "https://github.com/GeorgeFilipkin/pulsemixer/")
289 (synopsis "Command-line and curses mixer for PulseAudio")
290 (description "Pulsemixer is a PulseAudio mixer with command-line and
291curses-style interfaces.")
292 (license l:expat)))