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