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