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