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