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