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