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