projects/guix·blob ruby-team · refs

584 lines · 22.3 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014 Andreas Enge <[email protected]>
3;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
4;;; Copyright © 2013 David Thompson <[email protected]>
5;;; Copyright © 2014 Sree Harsha Totakura <[email protected]>
6;;; Copyright © 2014 Mark H Weaver <[email protected]>
7;;; Copyright © 2015 Paul van der Walt <[email protected]>
8;;; Copyright © 2015, 2016, 2017, 2019 Efraim Flashner <[email protected]>
9;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <[email protected]>
10;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <[email protected]>
11;;; Copyright © 2018 Leo Famulari <[email protected]>
12;;; Copyright © 2020 Vincent Legoll <[email protected]>
13;;; Copyright © 2021 Brendan Tildesley <[email protected]>
14;;; Copyright © 2021 Matthew James Kraai <[email protected]>
15;;; Copyright © 2021 Vinicius Monego <[email protected]>
16;;; Copyright © 2024 Zheng Junjie <[email protected]>
17;;; Copyright © 2024, 2025 Janneke Nieuwenhuizen <[email protected]>
18;;; Copyright © 2025 Antoine Côté <[email protected]>
19;;;
20;;; This file is part of GNU Guix.
21;;;
22;;; GNU Guix is free software; you can redistribute it and/or modify it
23;;; under the terms of the GNU General Public License as published by
24;;; the Free Software Foundation; either version 3 of the License, or (at
25;;; your option) any later version.
26;;;
27;;; GNU Guix is distributed in the hope that it will be useful, but
28;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30;;; GNU General Public License for more details.
31;;;
32;;; You should have received a copy of the GNU General Public License
33;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35(define-module (gnu packages xiph)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages bison)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages curl)
41 #:use-module (gnu packages documentation)
42 #:use-module (gnu packages image)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages pulseaudio)
47 #:use-module (gnu packages tls)
48 #:use-module (gnu packages xml)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix packages)
51 #:use-module (guix utils)
52 #:use-module (guix download)
53 #:use-module (guix git-download)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix gexp))
56
57(define-public libogg
58 (package
59 (name "libogg")
60 (version "1.3.6")
61 (source (origin
62 (method url-fetch)
63 (uri (string-append "https://downloads.xiph.org/releases/ogg/libogg-"
64 version ".tar.xz"))
65 (sha256
66 (base32
67 "0q8hz9vqd044rr6d18ylp82craapcnhkq7yl436l060qir1570jw"))))
68 (build-system gnu-build-system)
69 (arguments
70 '(#:configure-flags '("--disable-static")))
71 (synopsis "Library for manipulating the ogg multimedia format")
72 (description
73 "The libogg library manipulates the ogg multimedia container
74format, which encapsulates raw compressed data and allows the interleaving of
75audio and video data. In addition to encapsulation and interleaving of
76multiple data streams, ogg provides packet framing, error detection, and
77periodic timestamps for seeking.")
78 (license (license:non-copyleft "file://COPYING"
79 "See COPYING in the distribution."))
80 (home-page "https://xiph.org/ogg/")))
81
82(define-public libvorbis
83 (package
84 (name "libvorbis")
85 (version "1.3.7")
86 (source (origin
87 (method url-fetch)
88 (uri (string-append "https://downloads.xiph.org/releases/vorbis/"
89 "libvorbis-" version ".tar.xz"))
90 (sha256
91 (base32
92 "0jwmf87x5sdis64rbv0l87mdpah1rbilkkxszipbzg128f9w8g5k"))))
93 (build-system gnu-build-system)
94 (propagated-inputs (list libogg))
95 (arguments `(#:configure-flags '("LDFLAGS=-lm"
96 "--disable-static")
97 #:parallel-tests? #f))
98 (synopsis "Library implementing the vorbis audio format")
99 (description
100 "The libvorbis library implements the ogg vorbis audio format,
101a fully open, non-proprietary, patent-and-royalty-free, general-purpose
102compressed audio format for mid to high quality (8kHz-48.0kHz, 16+ bit,
103polyphonic) audio and music at fixed and variable bitrates from 16 to
104128 kbps/channel.")
105 ;; This package shows a sizable speed increase when tuned.
106 (properties `((tunable? . #t)))
107 (license (license:non-copyleft "file://COPYING"
108 "See COPYING in the distribution."))
109 (home-page "https://xiph.org/vorbis/")))
110
111(define-public libtheora
112 (package
113 (name "libtheora")
114 (version "1.1.1")
115 (source (origin
116 (method url-fetch)
117 (uri (string-append "https://downloads.xiph.org/releases/theora/"
118 "libtheora-" version ".tar.xz"))
119 (sha256
120 (base32
121 "0q8wark9ribij57dciym5vdikg2464p8q2mgqvfb78ksjh4s8vgk"))
122 (patches (search-patches "libtheora-config-guess.patch"))))
123 (build-system gnu-build-system)
124 (arguments
125 (append
126 (if (and (target-riscv64?)
127 (%current-target-system))
128 (list #:phases
129 #~(modify-phases %standard-phases
130 (add-after 'unpack 'update-config
131 (lambda* (#:key native-inputs inputs #:allow-other-keys)
132 (for-each (lambda (file)
133 (install-file
134 (search-input-file
135 (or native-inputs inputs)
136 (string-append "/bin/" file)) "."))
137 '("config.guess" "config.sub"))))))
138 '())
139 (list #:configure-flags #~'("--disable-static"))))
140 (native-inputs
141 (if (and (target-riscv64?)
142 (%current-target-system))
143 (list config)
144 '()))
145 (inputs (list libvorbis))
146 ;; The .pc files refer to libogg.
147 (propagated-inputs (list libogg))
148 (synopsis "Library implementing the Theora video format")
149 (description
150 "The libtheora library implements the ogg theora video format,
151a fully open, non-proprietary, patent-and-royalty-free, general-purpose
152compressed video format.")
153 (license license:bsd-3)
154 (home-page "https://xiph.org/theora/")))
155
156(define-public speex
157 (package
158 (name "speex")
159 (version "1.2.1")
160 (source
161 (origin
162 (method url-fetch)
163 (uri (string-append "https://downloads.xiph.org/releases/speex/speex-"
164 version ".tar.gz"))
165 (sha256
166 (base32
167 "1spy51kaxfhpj8171gn1s69wz82nzkz2k0x7k0nhldwangrd8i2b"))))
168 (build-system gnu-build-system)
169 (arguments
170 '(#:configure-flags '("--disable-static")))
171 (native-inputs
172 (list pkg-config))
173 (inputs
174 (list libogg speexdsp))
175 (home-page "https://gnu.org/software/speex")
176 (synopsis "Library for patent-free audio compression format")
177 (description
178 "GNU Speex is a patent-free audio compression codec specially designed
179for speech. It is well-adapted to internet applications, such as VoIP. It
180features compression of different bands in the same bitstream, intensity
181stereo encoding, and voice activity detection.")
182 ;; 'src/getopt.c' is under LGPLv2+
183 (license (license:non-copyleft "file://COPYING"
184 "See COPYING in the distribution."))))
185
186(define-public speexdsp
187 (package
188 (name "speexdsp")
189 (version "1.2.1")
190 (source (origin
191 (method url-fetch)
192 (uri (string-append "https://downloads.xiph.org/releases/speex/"
193 "speexdsp-" version ".tar.gz"))
194 (sha256
195 (base32
196 "0gadnnpg9994cindpnw35j45dnr4bflkig1aqxlrafd6wi1p6xwc"))))
197 (build-system gnu-build-system)
198 (arguments
199 `(#:configure-flags '("--disable-static"
200 ,@(if (string=? "aarch64-linux"
201 (%current-system))
202 '("--enable-neon=no") ; neon defaults to armv7-a
203 '()))))
204 (home-page "https://speex.org/")
205 (synopsis "Speex processing library")
206 (description
207 "SpeexDSP is a @dfn{DSP} (Digital Signal Processing) library based on
208work from the @code{speex} codec.")
209 (license (license:non-copyleft "file://COPYING"
210 "See COPYING in the distribution."))))
211
212(define-public ao
213 (package
214 (name "ao")
215 ;; We need a few commits on top of 1.2.2 to fix CVE-2017-11548.
216 (version "1.2.2-5-g20dc8ed")
217 (source (origin
218 (method git-fetch)
219 (uri (git-reference
220 (url "https://gitlab.xiph.org/xiph/libao")
221 (commit version)))
222 (file-name (git-file-name name version))
223 (sha256
224 (base32
225 "1d1b3g2a7jd43c32242yq6nfysqsmp7rjslhvbrmpgk119l5fnbj"))))
226 (build-system gnu-build-system)
227 ;; FIXME: Add further backends, see the summary printed after configure.
228 ;; XXX: Should back-ends be pushed to different outputs? For instance,
229 ;; "out" would include only the ALSA back-end, while "pulse" would
230 ;; contain 'lib/ao/plugins-4/libpulse.*'.
231 (inputs
232 (list alsa-lib pulseaudio))
233 (native-inputs
234 (list pkg-config autoconf automake libtool))
235 (synopsis "Cross platform audio library")
236 (description
237 "Libao is a cross-platform audio library that allows programs to
238output audio using a simple API on a wide variety of platforms.
239It currently supports:
240@enumerate
241@item Null output (handy for testing without a sound device),
242@item WAV files,
243@item AU files,
244@item RAW files,
245@item OSS (Open Sound System, used on Linux and FreeBSD),
246@item ALSA (Advanced Linux Sound Architecture),
247@item aRts (Analog RealTime Synth, used by KDE),
248@item PulseAudio (next generation GNOME sound server),
249@item esd (EsounD or Enlightened Sound Daemon),
250@item Mac OS X,
251@item Windows (98 and later),
252@item AIX,
253@item Sun/NetBSD/OpenBSD,
254@item IRIX,
255@item NAS (Network Audio Server),
256@item RoarAudio (Modern, multi-OS, networked Sound System),
257@item OpenBSD's sndio.
258@end enumerate
259")
260 (license license:gpl2+)
261 (properties '((cpe-name . "libao")))
262 (home-page "https://www.xiph.org/ao/")))
263
264(define-public flac
265 (package
266 (name "flac")
267 (version "1.5.0")
268 (source (origin
269 (method url-fetch)
270 (uri (string-append "https://downloads.xiph.org/releases/flac/flac-"
271 version ".tar.xz"))
272 (sha256
273 (base32
274 "085rqa2h8qw8zl1ywkbkdjq7lv4v56hw98rv87wgybx8j9jwghgj"))))
275 (build-system gnu-build-system)
276 (arguments
277 `(#:parallel-tests? #f
278 ;; Unfortunately we need to make some changes to work around an
279 ;; assembly generation errors when building for armhf-linux.
280 #:phases
281 ,@(if (target-arm32?)
282 `((modify-phases %standard-phases
283 (add-before 'configure 'patch-configure
284 (lambda _
285 (substitute* "configure"
286 (("-O3") "-O2"))))))
287 '(%standard-phases))))
288 ;; FIXME: configure also looks for xmms, input could be added once it exists
289 (propagated-inputs (list libogg)) ; required by flac.pc
290 (synopsis "Free lossless audio codec")
291 (description
292"FLAC stands for Free Lossless Audio Codec, an audio format that is lossless,
293meaning that audio is compressed in FLAC without any loss in quality.")
294 (license (license:non-copyleft "file://COPYING"
295 "See COPYING in the distribution.")) ; and LGPL and GPL
296 (home-page "https://xiph.org/flac/")))
297
298(define-public libkate
299 (package
300 (name "libkate")
301 (version "0.4.1")
302 (source (origin
303 (method url-fetch)
304 (uri (string-append "https://downloads.xiph.org/releases/kate/"
305 "libkate-" version ".tar.gz"))
306 (sha256
307 (base32
308 "0s3vr2nxfxlf1k75iqpp4l78yf4gil3f0v778kvlngbchvaq23n4"))))
309 (build-system gnu-build-system)
310 (native-inputs (list doxygen bison pkg-config))
311 ;; FIXME: Add optional input liboggz
312 (inputs (list libogg libpng python-wrapper zlib))
313 (synopsis "Karaoke and text codec for embedding in ogg")
314 (description
315 "Kate is an overlay codec, originally designed for karaoke and text,
316that can be multiplixed in Ogg. Text and images can be carried by a Kate
317stream, and animated. Most of the time, this would be multiplexed with
318audio/video to carry subtitles, song lyrics (with or without karaoke data),
319etc., but doesn't have to be.
320
321Series of curves (splines, segments, etc.) may be attached to various
322properties (text position, font size, etc.) to create animated overlays.
323This allows scrolling or fading text to be defined. This can even be used
324to draw arbitrary shapes, so hand drawing can also be represented by a
325Kate stream.")
326 (license license:bsd-3)
327 (home-page "https://wiki.xiph.org/OggKate")))
328
329(define-public vorbis-tools
330 (package
331 (name "vorbis-tools")
332 (version "1.4.3")
333 (source (origin
334 (method url-fetch)
335 (uri (string-append "https://downloads.xiph.org/releases/vorbis/"
336 "vorbis-tools-" version ".tar.gz"))
337 (sha256
338 (base32
339 "1phd8vh66sw1df6crzsn8yr58ya3w3gpwzkrdfzwxgbpczf3vzm1"))))
340 (build-system gnu-build-system)
341 (arguments
342 (list
343 #:configure-flags
344 ;; Relax gcc-14's strictness.
345 #~(list "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration")))
346 (inputs (list ao
347 curl
348 flac
349 libkate
350 libogg
351 libvorbis
352 speex))
353 (native-inputs (list pkg-config))
354 (synopsis "Ogg vorbis tools")
355 (description
356 "Ogg vorbis is a non-proprietary, patent-and-royalty-free,
357general-purpose compressed audio format.
358
359The package vorbis-tools contains
360ogg123, an ogg vorbis command line audio player;
361oggenc, the ogg vorbis encoder;
362oggdec, a simple, portable command line decoder (to wav and raw);
363ogginfo, to obtain information (tags, bitrate, length, etc.) about
364 an ogg vorbis file.")
365 (license license:gpl2)
366 (home-page "https://xiph.org/vorbis/")))
367
368(define-public opus
369 (package
370 (name "opus")
371 (version "1.6.1")
372 (source
373 (origin
374 (method url-fetch)
375 (uri (string-append "https://downloads.xiph.org/releases/opus/opus-"
376 version ".tar.gz"))
377 (sha256
378 (base32 "188i4ibr80az4217q04z22cyrfv4xmk29cqmvy22bsbv429vbz3g"))))
379 (build-system gnu-build-system)
380 (arguments
381 '(#:configure-flags '("--disable-static")))
382 (synopsis "Versatile audio codec")
383 (description
384 "Opus is a totally open, royalty-free, highly versatile audio codec. Opus
385is unmatched for interactive speech and music transmission over the Internet,
386but is also intended for storage and streaming applications. It is
387standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which
388incorporated technology from Skype's SILK codec and Xiph.Org's CELT codec.")
389 ;; This package shows a sizable speed increase when tuned.
390 (properties `((tunable? . #t) (lint-hidden-cpe-vendors "discordjs")))
391 (license license:bsd-3)
392 (home-page "https://www.opus-codec.org")))
393
394(define-public opus-tools
395 (package
396 (name "opus-tools")
397 (version "0.2")
398 (source
399 (origin
400 (method git-fetch)
401 (uri (git-reference
402 (url "https://gitlab.xiph.org/xiph/opus-tools.git")
403 (commit (string-append "v" version))))
404 (sha256
405 (base32 "1g1lrhi0jqk9i9pxmay8jhmy4zhaffbqh2rjhxkacildzl6xrvyz"))
406 (file-name (git-file-name name version))))
407 (build-system gnu-build-system)
408 (arguments
409 (substitute-keyword-arguments (package-arguments libopusenc)
410 ((#:configure-flags configure-flags)
411 ;; The mechanism for detecting pkg-config does not work while cross
412 ;; compiling. Therefore we skip the test by overriding it.
413 #~(list "HAVE_PKG_CONFIG=yes"))))
414 (native-inputs (list autoconf automake libtool pkg-config))
415 (inputs (list flac libopusenc opusfile))
416 (synopsis
417 "Command line utilities to encode, inspect, and decode .opus files")
418 (description
419 "Opus is a royalty-free, highly versatile audio codec.
420Opus-tools provide command line utilities for creating, inspecting and
421decoding .opus files.")
422 (license license:bsd-3)
423 (home-page "https://www.opus-codec.org")))
424
425(define-public opusfile
426 (package
427 (name "opusfile")
428 (version "0.12")
429 (source (origin
430 (method url-fetch)
431 (uri (string-append
432 "https://downloads.xiph.org/releases/opus/opusfile-" version
433 ".tar.gz"))
434 (sha256
435 (base32
436 "02smwc5ah8nb3a67mnkjzqmrzk43j356hgj2a97s9midq40qd38i"))
437 (patches (search-patches "opusfile-CVE-2022-47021.patch"))))
438 (build-system gnu-build-system)
439 (arguments
440 '(#:configure-flags '("--disable-static")
441 #:phases
442 (modify-phases %standard-phases
443 (add-after 'unpack 'fix-multistream
444 ;; Opus include directory should be passed explicitly:
445 ;; https://github.com/xiph/opusfile/issues/10 however,
446 ;; opus_multistream.h still can't be found by the compiler.
447 (lambda _
448 (substitute* "include/opusfile.h"
449 (("opus_multistream\\.h") "opus/opus_multistream.h")))))))
450 ;; Required by opusfile.pc and opusurl.pc.
451 (propagated-inputs
452 (list libogg openssl opus))
453 (native-inputs
454 (list pkg-config))
455 (synopsis "Versatile audio codec")
456 (description
457 "The opusfile library provides seeking, decode, and playback of Opus
458streams in the Ogg container (.opus files) including over http(s) on posix and
459windows systems.")
460 (license license:bsd-3)
461 (home-page "https://www.opus-codec.org")))
462
463(define-public libopusenc
464 (package
465 (name "libopusenc")
466 (version "0.3")
467 (source
468 (origin
469 (method git-fetch)
470 (uri (git-reference
471 (url "https://gitlab.xiph.org/xiph/libopusenc.git")
472 (commit (string-append "v" version))))
473 (sha256
474 (base32 "147cpqgfyfz6nr85hi4prvcbs3d72zzad48w3rhgld429hhjd34z"))
475 (file-name (git-file-name name version))))
476 (build-system gnu-build-system)
477 (arguments
478 (list
479 #:configure-flags
480 #~(list "--disable-static")
481 #:phases
482 #~(modify-phases %standard-phases
483 (add-before 'bootstrap 'write-package_version-file
484 (lambda _
485 (with-output-to-file "package_version"
486 (lambda _
487 (display
488 (string-append "AUTO_UPDATE=no\n"
489 "PACKAGE_VERSION=\"" #$version "\"")))))))))
490 (native-inputs (list autoconf automake libtool pkg-config))
491 (propagated-inputs (list opus))
492 (synopsis "Library for encoding Opus audio files and streams")
493 (description "The libopusenc libraries provide a high-level API for
494encoding Opus files and streams.")
495 (home-page "https://www.opus-codec.org/")
496 (license license:bsd-3)))
497
498(define-public icecast
499 (package
500 (name "icecast")
501 (version "2.4.4")
502 (source (origin
503 (method url-fetch)
504 (uri (string-append
505 "https://downloads.xiph.org/releases/icecast/icecast-"
506 version ".tar.gz"))
507 (sha256
508 (base32
509 "0i2d9rhav0x6js2qhjf5iy6j2a7f0d11ail0lfv40hb1kygrgda9"))))
510 (build-system gnu-build-system)
511 (native-inputs
512 (list pkg-config))
513 (inputs
514 (list libxslt
515 libxml2
516 openssl
517 curl
518 libogg
519 libvorbis
520 libtheora
521 speex))
522 (synopsis "Streaming media server")
523 (description "Icecast is a streaming media server which currently supports
524Ogg (Vorbis and Theora), Opus, WebM and MP3 audio streams. It can be used to
525create an Internet radio station or a privately running jukebox and many
526things in between.")
527 (home-page "https://icecast.org/")
528 (license license:gpl2)))
529
530(define-public libshout
531 (package
532 (name "libshout")
533 (version "2.4.6")
534 (source (origin
535 (method url-fetch)
536 (uri (string-append
537 "https://downloads.xiph.org/releases/libshout/"
538 "libshout-" version ".tar.gz"))
539 (sha256
540 (base32
541 "0469yzc1csm25f5dbyb7ly7i1mzjz13pw8c8bmswkpfzxzqd9jrr"))))
542 (build-system gnu-build-system)
543 (arguments
544 (list
545 #:configure-flags #~(list
546 #$(string-append
547 "CFLAGS=-g -O2"
548 " -Wno-error=implicit-function-declaration"))))
549 (native-inputs
550 (list pkg-config))
551 (propagated-inputs
552 ;; shout.pc refers to all these.
553 (list libtheora libvorbis speex))
554 (home-page "https://icecast.org/")
555 (synopsis "Audio streaming library for icecast encoders")
556 (description
557 "Libshout is a library for communicating with and sending data to an
558icecast server. It handles the socket connection, the timing of the data,
559and prevents bad data from getting to the icecast server.")
560 (license license:gpl2+)))
561
562(define-public rnnoise
563 (package
564 (name "rnnoise")
565 (version "0.1.1")
566 (source (origin
567 (method git-fetch)
568 (uri (git-reference
569 (url "https://gitlab.xiph.org/xiph/rnnoise")
570 (commit (string-append "v" version))))
571 (file-name (git-file-name name version))
572 (sha256
573 (base32
574 "1gmj3l76jjjsfgxwsqsgjs4n4wvrrsl3hiafgsrdc6v63in5zr6s"))))
575 (build-system gnu-build-system)
576 (native-inputs
577 (list autoconf automake libtool))
578 (home-page "https://gitlab.xiph.org/xiph/rnnoise")
579 (synopsis "Real-time noise suppression")
580 (description "RNNoise is a noise suppression library based on a recurrent
581neural network. The algorithm is described in Jean-Marc Valin's paper
582@cite{A Hybrid DSP/Deep Learning Approach to Real-Time Full-Band Speech
583Enhancement}.")
584 (license license:bsd-3)))