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