gnu: Add emacs-json-snatcher.
[jackhill/guix/guix.git] / gnu / packages / xiph.scm
CommitLineData
6a06172b 1;;; GNU Guix --- Functional package management for GNU
707d3e24 2;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
1f5ec939 3;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
15e82fb2 4;;; Copyright © 2013 David Thompson <dthompson2@worcester.edu>
a7f904fd 5;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
c9a010db 6;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
a7aa4e2a 7;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
275cc092 8;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
01229cbe 9;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
6a06172b
AE
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
54ff0b7d 26(define-module (gnu packages xiph)
dc2e4b0e
AE
27 #:use-module (gnu packages)
28 #:use-module (gnu packages bison)
29 #:use-module (gnu packages compression)
1f73d3b4 30 #:use-module (gnu packages curl)
99828fa7 31 #:use-module (gnu packages documentation)
e55354b8 32 #:use-module (gnu packages image)
76e38f0d 33 #:use-module (gnu packages pkg-config)
dc2e4b0e 34 #:use-module (gnu packages python)
ba04571a 35 #:use-module (gnu packages linux)
5ccca004 36 #:use-module (gnu packages pulseaudio)
cc2b77df 37 #:use-module (gnu packages tls)
6ef1c223 38 #:use-module (gnu packages xml)
b5b73a82 39 #:use-module ((guix licenses) #:prefix license:)
6a06172b
AE
40 #:use-module (guix packages)
41 #:use-module (guix download)
cfc8261c
LC
42 #:use-module (guix build-system gnu)
43 #:export (libogg
44 libvorbis
15e82fb2 45 libtheora
cfc8261c 46 speex
01229cbe 47 speexdsp
cfc8261c
LC
48 ao
49 flac
50 libkate
a7f904fd 51 vorbis-tools
a886404f 52 opus
a7aa4e2a 53 opusfile
a886404f 54 opus-tools))
6a06172b 55
cfc8261c 56(define libogg
6a06172b
AE
57 (package
58 (name "libogg")
72fe9d0b 59 (version "1.3.2")
6a06172b
AE
60 (source (origin
61 (method url-fetch)
62 (uri (string-append "http://downloads.xiph.org/releases/ogg/libogg-"
63 version ".tar.xz"))
64 (sha256
65 (base32
72fe9d0b 66 "16z74q422jmprhyvy7c9x909li8cqzmvzyr8cgbm52xcsp6pqs1z"))))
6a06172b 67 (build-system gnu-build-system)
35b9e423 68 (synopsis "Library for manipulating the ogg multimedia format")
6a06172b
AE
69 (description
70 "The libogg library allows to manipulate the ogg multimedia container
71format, which encapsulates raw compressed data and allows the interleaving of
35b9e423 72audio and video data. In addition to encapsulation and interleaving of
6a06172b
AE
73multiple data streams, ogg provides packet framing, error detection, and
74periodic timestamps for seeking.")
166191b3 75 (license (license:non-copyleft "file://COPYING"
dc2e4b0e 76 "See COPYING in the distribution."))
6a06172b
AE
77 (home-page "http://xiph.org/ogg/")))
78
cfc8261c 79(define libvorbis
6a06172b
AE
80 (package
81 (name "libvorbis")
32d9109f 82 (version "1.3.5")
6a06172b
AE
83 (source (origin
84 (method url-fetch)
35b9e423
EB
85 (uri (string-append "http://downloads.xiph.org/releases/vorbis/"
86 "libvorbis-" version ".tar.xz"))
6a06172b
AE
87 (sha256
88 (base32
32d9109f 89 "1lg1n3a6r41492r7in0fpvzc7909mc5ir9z0gd3qh2pz4yalmyal"))))
6a06172b 90 (build-system gnu-build-system)
bad312e3 91 (propagated-inputs `(("libogg" ,libogg)))
f0cfe3c4
EB
92 (arguments `(#:configure-flags '("LDFLAGS=-lm")
93 #:parallel-tests? #f))
35b9e423 94 (synopsis "Library implementing the vorbis audio format")
6a06172b
AE
95 (description
96 "The libvorbis library implements the ogg vorbis audio format,
97a fully open, non-proprietary, patent-and-royalty-free, general-purpose
98compressed audio format for mid to high quality (8kHz-48.0kHz, 16+ bit,
99polyphonic) audio and music at fixed and variable bitrates from 16 to
100128 kbps/channel.")
166191b3 101 (license (license:non-copyleft "file://COPYING"
dc2e4b0e 102 "See COPYING in the distribution."))
6a06172b
AE
103 (home-page "http://xiph.org/vorbis/")))
104
15e82fb2
DT
105(define libtheora
106 (package
107 (name "libtheora")
108 (version "1.1.1")
109 (source (origin
110 (method url-fetch)
35b9e423
EB
111 (uri (string-append "http://downloads.xiph.org/releases/theora/"
112 "libtheora-" version ".tar.xz"))
15e82fb2
DT
113 (sha256
114 (base32
46acd054 115 "0q8wark9ribij57dciym5vdikg2464p8q2mgqvfb78ksjh4s8vgk"))
fc1adab1 116 (patches (search-patches "libtheora-config-guess.patch"))))
15e82fb2
DT
117 (build-system gnu-build-system)
118 (inputs `(("libvorbis" ,libvorbis)))
119 ;; The .pc files refer to libogg.
120 (propagated-inputs `(("libogg" ,libogg)))
121 (synopsis "Library implementing the Theora video format")
122 (description
123 "The libtheora library implements the ogg theora video format,
124a fully open, non-proprietary, patent-and-royalty-free, general-purpose
125compressed video format.")
126 (license license:bsd-3)
127 (home-page "http://xiph.org/theora/")))
128
cfc8261c 129(define speex
1f5ec939
NK
130 (package
131 (name "speex")
8efd10cd 132 (version "1.2.0")
1f5ec939
NK
133 (source
134 (origin
135 (method url-fetch)
136 (uri (string-append "http://downloads.xiph.org/releases/speex/speex-"
137 version ".tar.gz"))
138 (sha256
139 (base32
8efd10cd 140 "150047wnllz4r94whb9r73l5qf0z5z3rlhy98bawfbblmkq8mbpa"))))
1f5ec939 141 (build-system gnu-build-system)
b79813a1
SB
142 (native-inputs
143 `(("pkg-config" ,pkg-config)))
144 (inputs
145 `(("libogg" ,libogg)
146 ("speexdsp" ,speexdsp)))
1f5ec939 147 (home-page "https://gnu.org/software/speex")
f50d2669 148 (synopsis "Library for patent-free audio compression format")
1f5ec939 149 (description
79c311b8
LC
150 "GNU Speex is a patent-free audio compression codec specially designed
151for speech. It is well-adapted to internet applications, such as VoIP. It
a22dc0c4
LC
152features compression of different bands in the same bitstream, intensity
153stereo encoding, and voice activity detection.")
1f5ec939 154 ;; 'src/getopt.c' is under LGPLv2+
166191b3 155 (license (license:non-copyleft "file://COPYING"
dc2e4b0e 156 "See COPYING in the distribution."))))
1f5ec939 157
01229cbe
MB
158(define speexdsp
159 (package
160 (name "speexdsp")
161 (version "1.2rc3")
162 (source (origin
163 (method url-fetch)
164 (uri (string-append "http://downloads.xiph.org/releases/speex/"
165 "speexdsp-" version ".tar.gz"))
166 (sha256
167 (base32
168 "1wcjyrnwlkayb20zdhp48y260rfyzg925qpjpljd5x9r01h8irja"))))
169 (build-system gnu-build-system)
170 (home-page "https://speex.org/")
171 (synopsis "Speex processing library")
172 (description
173 "SpeexDSP is a @dfn{DSP} (Digital Signal Processing) library based on
174work from the @code{speex} codec.")
175 (license (license:non-copyleft "file://COPYING"
176 "See COPYING in the distribution."))))
177
cfc8261c 178(define ao
76e38f0d
AE
179 (package
180 (name "ao")
35f6c497 181 (version "1.2.0")
76e38f0d
AE
182 (source
183 (origin
184 (method url-fetch)
185 (uri (string-append "http://downloads.xiph.org/releases/ao/libao-"
186 version ".tar.gz"))
187 (sha256
188 (base32
35f6c497 189 "1bwwv1g9lchaq6qmhvj1pp3hnyqr64ydd4j38x94pmprs4d27b83"))))
76e38f0d
AE
190 (build-system gnu-build-system)
191 ;; FIXME: Add further backends, see the summary printed after configure.
5ccca004
LC
192 ;; XXX: Should back-ends be pushed to different outputs? For instance,
193 ;; "out" would include only the ALSA back-end, while "pulse" would
54ff0b7d 194 ;; contain 'lib/ao/plugins-4/libpulse.*'.
d4fe27fe
ML
195 (inputs
196 `(("alsa-lib" ,alsa-lib)
197 ("pulseaudio" ,pulseaudio)))
198 (native-inputs
199 `(("pkg-config" ,pkg-config)))
ba04571a 200 (synopsis "Cross platform audio library")
76e38f0d
AE
201 (description
202 "Libao is a cross-platform audio library that allows programs to
203output audio using a simple API on a wide variety of platforms.
204It currently supports:
2df092a9 205@enumerate
55f4b4e0
JD
206@item Null output (handy for testing without a sound device),
207@item WAV files,
208@item AU files,
209@item RAW files,
210@item OSS (Open Sound System, used on Linux and FreeBSD),
211@item ALSA (Advanced Linux Sound Architecture),
212@item aRts (Analog RealTime Synth, used by KDE),
213@item PulseAudio (next generation GNOME sound server),
214@item esd (EsounD or Enlightened Sound Daemon),
215@item Mac OS X,
216@item Windows (98 and later),
217@item AIX,
218@item Sun/NetBSD/OpenBSD,
219@item IRIX,
220@item NAS (Network Audio Server),
221@item RoarAudio (Modern, multi-OS, networked Sound System),
222@item OpenBSD's sndio.
2df092a9 223@end enumerate
55f4b4e0 224")
dc2e4b0e 225 (license license:gpl2+)
76e38f0d
AE
226 (home-page "http://www.xiph.org/ao/")))
227
cfc8261c 228(define flac
9ae7865e
AE
229 (package
230 (name "flac")
b4fddeae 231 (version "1.3.2")
9ae7865e
AE
232 (source (origin
233 (method url-fetch)
234 (uri (string-append "http://downloads.xiph.org/releases/flac/flac-"
399fdcf7 235 version ".tar.xz"))
9ae7865e
AE
236 (sha256
237 (base32
b4fddeae 238 "0gymm2j3276kr9nz6vmgfwsdfrq6c449n40a0mzz8h6wc7nw7kwi"))))
9ae7865e
AE
239 (build-system gnu-build-system)
240 (arguments
9b1bf330 241 `(#:parallel-tests? #f))
9ae7865e 242 ;; FIXME: configure also looks for xmms, input could be added once it exists
d529b91b 243 (propagated-inputs `(("libogg" ,libogg))) ; required by flac.pc
35b9e423 244 (synopsis "Free lossless audio codec")
9ae7865e
AE
245 (description
246"FLAC stands for Free Lossless Audio Codec, an audio format that is lossless,
247meaning that audio is compressed in FLAC without any loss in quality.")
166191b3 248 (license (license:non-copyleft "file://COPYING"
dc2e4b0e 249 "See COPYING in the distribution.")) ; and LGPL and GPL
9ae7865e
AE
250 (home-page "http://xiph.org/flac/")))
251
cfc8261c 252(define libkate
dc2e4b0e
AE
253 (package
254 (name "libkate")
255 (version "0.4.1")
256 (source (origin
257 (method url-fetch)
7acc2a3e
EF
258 (uri (string-append "http://downloads.xiph.org/releases/kate/"
259 "libkate-" version ".tar.gz"))
dc2e4b0e
AE
260 (sha256
261 (base32
262 "0s3vr2nxfxlf1k75iqpp4l78yf4gil3f0v778kvlngbchvaq23n4"))))
263 (build-system gnu-build-system)
707d3e24
AE
264 (native-inputs `(("doxygen" ,doxygen)
265 ("pkg-config" ,pkg-config)))
266 ;; FIXME: Add optional input liboggz
dc2e4b0e
AE
267 (inputs `(("bison" ,bison)
268 ("libogg" ,libogg)
269 ("libpng" ,libpng)
7acc2a3e 270 ("python" ,python-wrapper)
dc2e4b0e 271 ("zlib" ,zlib)))
35b9e423 272 (synopsis "Karaoke and text codec for embedding in ogg")
dc2e4b0e
AE
273 (description
274 "Kate is an overlay codec, originally designed for karaoke and text,
35b9e423
EB
275that can be multiplixed in Ogg. Text and images can be carried by a Kate
276stream, and animated. Most of the time, this would be multiplexed with
dc2e4b0e
AE
277audio/video to carry subtitles, song lyrics (with or without karaoke data),
278etc., but doesn't have to be.
279
280Series of curves (splines, segments, etc.) may be attached to various
281properties (text position, font size, etc.) to create animated overlays.
35b9e423 282This allows scrolling or fading text to be defined. This can even be used
dc2e4b0e
AE
283to draw arbitrary shapes, so hand drawing can also be represented by a
284Kate stream.")
285 (license license:bsd-3)
7acc2a3e 286 (home-page "https://wiki.xiph.org/OggKate")))
dc2e4b0e 287
cfc8261c 288(define vorbis-tools
6a06172b
AE
289 (package
290 (name "vorbis-tools")
291 (version "1.4.0")
292 (source (origin
293 (method url-fetch)
35b9e423
EB
294 (uri (string-append "http://downloads.xiph.org/releases/vorbis/"
295 "vorbis-tools-" version ".tar.gz"))
6a06172b
AE
296 (sha256
297 (base32
ef0f0d5f 298 "1g12bnh5ah08v529y72kfdz5lhvy75iaz7f9jskyby23m9dkk2d3"))
b3d20b82
EF
299 (patches (search-patches
300 "vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch"
301 "vorbis-tools-CVE-2014-9640.patch"
302 "vorbis-tools-CVE-2015-6749.patch"))))
6a06172b 303 (build-system gnu-build-system)
1f73d3b4
AE
304 (inputs `(("ao" ,ao)
305 ("curl" ,curl)
dc2e4b0e
AE
306 ("flac" ,flac)
307 ("libkate" ,libkate)
1f73d3b4 308 ("libogg" ,libogg)
1f5ec939
NK
309 ("libvorbis" ,libvorbis)
310 ("speex" ,speex)))
41eb1198 311 (native-inputs `(("pkg-config" ,pkg-config)))
35b9e423 312 (synopsis "Ogg vorbis tools")
6a06172b
AE
313 (description
314 "Ogg vorbis is a non-proprietary, patent-and-royalty-free,
315general-purpose compressed audio format.
316
317The package vorbis-tools contains
318ogg123, an ogg vorbis command line audio player;
319oggenc, the ogg vorbis encoder;
320oggdec, a simple, portable command line decoder (to wav and raw);
321ogginfo, to obtain information (tags, bitrate, length, etc.) about
322 an ogg vorbis file.")
dc2e4b0e 323 (license license:gpl2)
6a06172b 324 (home-page "http://xiph.org/vorbis/")))
a7f904fd
SHT
325
326(define opus
327 (package
328 (name "opus")
fce8285e 329 (version "1.2.1")
a7f904fd
SHT
330 (source (origin
331 (method url-fetch)
fce8285e
LF
332 (uri (string-append "https://archive.mozilla.org/pub/opus/opus-"
333 version ".tar.gz"))
a7f904fd
SHT
334 (sha256
335 (base32
fce8285e 336 "0ch7yzgg4bn1g36bpjsfrgs4n19c84d7wpdida6yzifrrhwx7byg"))))
a7f904fd 337 (build-system gnu-build-system)
35b9e423 338 (synopsis "Versatile audio codec")
a7f904fd 339 (description
35b9e423 340 "Opus is a totally open, royalty-free, highly versatile audio codec. Opus
a7f904fd 341is unmatched for interactive speech and music transmission over the Internet,
35b9e423 342but is also intended for storage and streaming applications. It is
a7f904fd
SHT
343standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which
344incorporated technology from Skype's SILK codec and Xiph.Org's CELT codec.")
345 (license license:bsd-3)
a8bcc5ff 346 (home-page "https://www.opus-codec.org")))
a886404f
JD
347
348(define opus-tools
349 (package
350 (name "opus-tools")
99d8b079 351 (version "0.1.10")
a886404f
JD
352 (source (origin
353 (method url-fetch)
354 (uri (string-append
97a79b19 355 "http://downloads.xiph.org/releases/opus/opus-tools-"
a886404f
JD
356 version ".tar.gz"))
357 (sha256
e881752c 358 (base32
99d8b079 359 "135jfb9ny3xvd27idsxj7j5ns90lslbyrq70cq3bfwcls4r7add2"))))
a886404f
JD
360 (build-system gnu-build-system)
361 (arguments
362 ;; The package developers misuse pkg-config such that it doesn't work
e881752c 363 ;; when cross compiling. Therefore we avoid it completly and set the
a886404f
JD
364 ;; necessary flags ourselves.
365 `(#:configure-flags (list (string-append "CFLAGS=-I"
366 (assoc-ref %build-inputs "libogg")
367 "/include -I"
368 (assoc-ref %build-inputs "opus")
369 "/include/opus"))))
370 (inputs `(("libogg" ,libogg)
371 ("opus" ,opus)
372 ("flac" ,flac)))
e881752c
AK
373 (synopsis
374 "Command line utilities to encode, inspect, and decode .opus files")
a886404f
JD
375 (description "Opus is a royalty-free, highly versatile audio codec.
376Opus-tools provide command line utilities for creating, inspecting and
e881752c 377decoding .opus files.")
a886404f 378 (license license:bsd-3)
99d8b079 379 (home-page "https://www.opus-codec.org")))
6ef1c223 380
a7aa4e2a
PW
381(define opusfile
382 (package
383 (name "opusfile")
83b294b6 384 (version "0.8")
a7aa4e2a
PW
385 (source (origin
386 (method url-fetch)
387 (uri (string-append
388 "http://downloads.xiph.org/releases/opus/opusfile-" version
389 ".tar.gz"))
390 (sha256
391 (base32
83b294b6 392 "192mp2jgn5s9815h31ybzsfipmbppmdhwx1dymrk26xarz9iw8rc"))))
a7aa4e2a
PW
393 (build-system gnu-build-system)
394 (propagated-inputs
395 `(("opus" ,opus)))
396 (native-inputs
397 `(("pkg-config" ,pkg-config)))
398 (inputs
399 `(("libogg" ,libogg)
400 ("openssl" ,openssl)))
401 (synopsis "Versatile audio codec")
402 (description
403 "The opusfile library provides seeking, decode, and playback of Opus
404streams in the Ogg container (.opus files) including over http(s) on posix and
405windows systems.")
406 (license license:bsd-3)
407 (home-page "http://www.opus-codec.org")))
408
6ef1c223
DT
409(define-public icecast
410 (package
411 (name "icecast")
6139fed5 412 (version "2.4.3")
6ef1c223
DT
413 (source (origin
414 (method url-fetch)
415 (uri (string-append
416 "http://downloads.xiph.org/releases/icecast/icecast-"
417 version ".tar.gz"))
418 (sha256
419 (base32
6139fed5 420 "14n5vm2xnyn8y7kl46lnnlgv6v5fjykhc57ffdsh0qaxfs6a8p68"))))
6ef1c223
DT
421 (build-system gnu-build-system)
422 (native-inputs
423 `(("pkg-config" ,pkg-config)))
424 (inputs
425 `(("libxslt" ,libxslt)
426 ("libxml2" ,libxml2)
427 ("openssl" ,openssl)
428 ("curl" ,curl)
429 ("libogg" ,libogg)
430 ("libvorbis" ,libvorbis)
431 ("libtheora" ,libtheora)
432 ("speex" ,speex)))
433 (synopsis "Streaming media server")
434 (description "Icecast is a streaming media server which currently supports
435Ogg (Vorbis and Theora), Opus, WebM and MP3 audio streams. It can be used to
436create an Internet radio station or a privately running jukebox and many
437things in between.")
438 (home-page "http://icecast.org/")
439 (license license:gpl2)))
9d44ab95
SB
440
441(define-public libshout
442 (package
443 (name "libshout")
0568dbab 444 (version "2.4.1")
9d44ab95
SB
445 (source (origin
446 (method url-fetch)
447 (uri (string-append
448 "http://downloads.xiph.org/releases/libshout/"
449 name "-" version ".tar.gz"))
450 (sha256
451 (base32
0568dbab 452 "0kgjpf8jkgyclw11nilxi8vyjk4s8878x23qyxnvybbgqbgbib7k"))))
9d44ab95
SB
453 (build-system gnu-build-system)
454 (native-inputs
455 `(("pkg-config" ,pkg-config)))
456 (propagated-inputs
457 ;; shout.pc refers to all these.
458 `(("libtheora" ,libtheora)
459 ("libvorbis" ,libvorbis)
460 ("speex" ,speex)))
461 (home-page "http://www.icecast.org/")
462 (synopsis "Audio streaming library for icecast encoders")
463 (description
464 "Libshout is a library for communicating with and sending data to an
465icecast server. It handles the socket connection, the timing of the data,
466and prevents bad data from getting to the icecast server.")
467 (license license:gpl2+)))