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