projects/guix·blob ruby-team · refs

917 lines · 35.6 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <[email protected]>
3;;; Copyright © 2014, 2015, 2017, 2020, 2021 Ludovic Courtès <[email protected]>
4;;; Copyright © 2015 Mark H Weaver <[email protected]>
5;;; Copyright © 2016, 2021 Efraim Flashner <[email protected]>
6;;; Copyright © 2017 Thomas Danckaert <[email protected]>
7;;; Copyright © 2017, 2019, 2020 Pierre Langlois <[email protected]>
8;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <[email protected]>
9;;; Copyright © 2019, 2025 Ricardo Wurmus <[email protected]>
10;;; Copyright © 2020 Michael Rohleder <[email protected]>
11;;; Copyright © 2021 Simon Streit <[email protected]>
12;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
13;;; Copyright © 2022 John Kehayias <[email protected]>
14;;; Copyright © 2022 Joeke de Graaf <[email protected]>
15;;; Copyright © 2023 Zheng Junjie <[email protected]>
16;;; Copyright © 2025 Janneke Nieuwenhuizen <[email protected]>
17;;; Copyright © 2025 Nguyễn Gia Phong <[email protected]>
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages mp3)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages gcc)
40 #:use-module (gnu packages bash)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages cdrom)
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages cmake)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages freedesktop)
47 #:use-module (gnu packages gettext)
48 #:use-module (gnu packages ghostscript)
49 #:use-module (gnu packages gnome)
50 #:use-module (gnu packages gstreamer)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages pcre)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages python-build)
58 #:use-module (gnu packages python-check)
59 #:use-module (gnu packages python-web)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages xiph)
62 #:use-module (gnu packages pulseaudio)
63 #:use-module (gnu packages linux) ;alsa-lib
64 #:use-module (gnu packages textutils) ;utfcpp
65 #:use-module (gnu packages video) ;ffmpeg
66 #:use-module (guix packages)
67 #:use-module (guix download)
68 #:use-module (guix gexp)
69 #:use-module (guix git-download)
70 #:use-module (guix utils)
71 #:use-module (guix build-system copy)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system pyproject)
74 #:use-module (guix build-system cmake)
75 #:use-module (guix build-system meson))
76
77(define-public libmad
78 (package
79 (name "libmad")
80 (version "0.15.1b")
81 (source (origin
82 (method url-fetch)
83 (uri (string-append "mirror://sourceforge/mad/libmad/"
84 version "/libmad-"
85 version ".tar.gz"))
86 (sha256
87 (base32
88 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv"))
89 (patches (search-patches "libmad-armv7-thumb-pt1.patch"
90 "libmad-armv7-thumb-pt2.patch"
91 "libmad-md_size.patch"
92 "libmad-length-check.patch"
93 "libmad-mips-newgcc.patch"))))
94 (build-system gnu-build-system)
95 (arguments
96 `(#:phases
97 (modify-phases %standard-phases
98 (add-before 'configure 'remove-unsupported-gcc-flags
99 (lambda _
100 ;; remove option that is not supported by gcc any more
101 (substitute* "configure" ((" -fforce-mem") ""))
102 #t))
103 ;; Normally one should not add a pkg-config file if one is not provided
104 ;; by upstream developers, but Audacity expects a pkg-config file for
105 ;; this package, and other major GNU/Linux distributions already provide
106 ;; such a file.
107 (add-after 'install 'install-pkg-config
108 (lambda* (#:key outputs #:allow-other-keys)
109 (let* ((out (assoc-ref outputs "out"))
110 (pkg-config-dir (string-append out "/lib/pkgconfig")))
111 (mkdir-p pkg-config-dir)
112 (with-output-to-file (string-append pkg-config-dir "/mad.pc")
113 (lambda _
114 (format #t
115 "prefix=~@*~a~@
116 libdir=${prefix}/lib~@
117 includedir=${prefix}/include~@
118
119 Name: libmad~@
120 Description:~@
121 Version: ~a~@
122 Libs: -L${libdir} -lmad~@
123 Cflags: -I${includedir}~%"
124 out ,version)))))))))
125 (synopsis "MPEG audio decoder")
126 (description
127 "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to
128lower sampling frequencies, as well as the de facto MPEG 2.5 format.
129All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are
130fully implemented.
131
132This package contains the library.")
133 (license license:gpl2+)
134 (home-page "https://www.underbit.com/products/mad/")))
135
136(define-public libid3tag
137 (package
138 (name "libid3tag")
139 (version "0.15.1b")
140 (source (origin
141 (method url-fetch)
142 (uri (string-append "mirror://sourceforge/mad/libid3tag/"
143 version "/libid3tag-"
144 version ".tar.gz"))
145 (sha256
146 (base32
147 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
148 (build-system gnu-build-system)
149 (arguments
150 `(#:phases
151 (modify-phases %standard-phases
152 ;; Normally one should not add a pkg-config file if one is not provided
153 ;; by upstream developers, but Audacity expects a pkg-config file for
154 ;; this package, and other major GNU/Linux distributions already provide
155 ;; such a file.
156 (add-after 'install 'install-pkg-config
157 (lambda* (#:key outputs #:allow-other-keys)
158 (let* ((out (assoc-ref outputs "out"))
159 (pkg-config-dir (string-append out "/lib/pkgconfig")))
160 (mkdir-p pkg-config-dir)
161 (with-output-to-file (string-append pkg-config-dir "/id3tag.pc")
162 (lambda _
163 (format #t
164 "prefix=~@*~a~@
165 libdir=${prefix}/lib~@
166 includedir=${prefix}/include~@
167
168 Name: libid3tag~@
169 Description:~@
170 Version: ~a~@
171 Libs: -L${libdir} -lid3tag -lz~@
172 Cflags: -I${includedir}~%"
173 out ,version))))))
174 ,@(if (and (%current-target-system)
175 (or (target-riscv64?)
176 (target-aarch64?)))
177 `((add-after 'unpack 'update-config
178 (lambda* (#:key native-inputs inputs #:allow-other-keys)
179 (for-each
180 (lambda (file)
181 (install-file
182 (search-input-file (or native-inputs inputs)
183 (string-append "/bin/" file))
184 "."))
185 '("config.guess" "config.sub")))))
186 '()))))
187 (native-inputs (if (and (%current-target-system)
188 (or (target-riscv64?)
189 (target-aarch64?)))
190 (list config)
191 '()))
192 (inputs (list zlib))
193 (synopsis "Library for reading ID3 tags")
194 (description
195 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
196versions of ID3v2.")
197 (license license:gpl2+)
198 (home-page "https://www.underbit.com/products/mad/")))
199
200(define-public id3lib
201 (package
202 (name "id3lib")
203 (version "3.8.3")
204 (source (origin
205 (method url-fetch)
206 (uri (string-append "mirror://sourceforge/id3lib/id3lib/"
207 version "/id3lib-" version ".tar.gz"))
208 (sha256
209 (base32
210 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97"))
211 (modules '((guix build utils)))
212 ;; Don't use bundled zlib
213 (snippet '(begin (delete-file-recursively "zlib") #t))
214 (patches (search-patches "id3lib-CVE-2007-4460.patch"
215 "id3lib-UTF16-writing-bug.patch"))))
216 (build-system gnu-build-system)
217 (inputs (list zlib))
218 (arguments
219 `(#:phases
220 (modify-phases %standard-phases
221 (add-before 'configure 'apply-patches
222 ;; TODO: create a patch for origin instead?
223 (lambda _
224 (substitute* "configure"
225 (("iomanip.h") "")) ; drop check for unused header
226 ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
227 (substitute* "include/id3/id3lib_strings.h"
228 (("include <string>") "include <cstring>\n#include <string>"))
229 (substitute* "include/id3/writers.h"
230 (("//\\#include <string.h>") "#include <cstring>"))
231 (substitute* "examples/test_io.cpp"
232 (("dami;") "dami;\nusing namespace std;"))
233 #t)))))
234 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
235 (description
236 "Id3lib is a cross-platform software development library for reading,
237writing, and manipulating ID3v1 and ID3v2 tags. It is an on-going project
238whose primary goals are full compliance with the ID3v2 standard, portability
239across several platforms, and providing a powerful and feature-rich API with
240a highly stable and efficient implementation.")
241 (license license:lgpl2.0+)
242 (home-page "https://id3lib.sourceforge.net/")))
243
244(define-public taglib
245 (package
246 (name "taglib")
247 (version "2.1.1")
248 (source (origin
249 (method git-fetch)
250 (uri (git-reference
251 (url "https://github.com/taglib/taglib")
252 (commit (string-append "v" version))))
253 (file-name (git-file-name name version))
254 (sha256
255 (base32
256 "0m1xyjsg6a8p4prn1xr1g29zsxqr7606cv3cblgjgxkb1dk26fx7"))))
257 (build-system cmake-build-system)
258 (arguments
259 (list #:configure-flags
260 #~(list "-DBUILD_SHARED_LIBS=ON")))
261 (inputs (list cppunit utfcpp zlib))
262 (home-page "https://taglib.org")
263 (synopsis "Library to access audio file meta-data")
264 (description
265 "TagLib is a C++ library for reading and editing the meta-data of several
266popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
267files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
268Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.")
269
270 ;; Dual-licensed: user may choose between LGPLv2.1 or MPLv1.1.
271 (license (list license:lgpl2.1 license:mpl1.1))))
272
273(define-public taglib-1
274 (package/inherit taglib
275 (name (package-name taglib))
276 (version "1.13.1")
277 (source (origin
278 (method git-fetch)
279 (uri (git-reference
280 (url "https://github.com/taglib/taglib")
281 (commit (string-append "v" version))))
282 (file-name (git-file-name name version))
283 (sha256
284 (base32
285 "0phliksg5r1n15prcbp391xk2z1fh2c7zlc7h0nabpwkf6j08za1"))))))
286
287(define-public minimp3
288 ;; The latest commit is used as there is no release.
289 (let ((commit "afb604c06bc8beb145fecd42c0ceb5bda8795144")
290 (revision "0"))
291 (package
292 (name "minimp3")
293 (version (git-version "0.0.0" revision commit))
294 (source (origin
295 (method git-fetch)
296 (uri (git-reference
297 (url "https://github.com/lieff/minimp3")
298 (commit commit)))
299 (file-name (git-file-name name version))
300 (sha256
301 (base32
302 "0brgrbij8swhp7lac21xnnrr5l0371lkr5vz6h9x0dbz1qq2xhsj"))))
303 ;; TODO: minimp3 has many more files for at least tests with scripts to
304 ;; run them, although it is unclear how to easily package them.
305 (build-system copy-build-system)
306 (arguments
307 '(#:install-plan
308 '(("minimp3.h" "include/")
309 ("minimp3_ex.h" "include/"))))
310 (home-page "https://github.com/lieff/minimp3")
311 (synopsis "Minimalistic MP3 decoder header library")
312 (description
313 "Minimp3 is a header-only MP3 decoder library.")
314 (license license:cc0))))
315
316(define-public mp3info
317 (package
318 (name "mp3info")
319 (version "0.8.5a")
320 (source (origin
321 (method url-fetch)
322 (uri (string-append
323 "https://ibiblio.org"
324 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
325 version ".tgz"))
326 (sha256
327 (base32
328 "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04"))
329 (modules '((guix build utils)))
330 (snippet
331 '(begin
332 (substitute* "Makefile"
333 (("/bin/rm") "rm")
334 (("/usr/bin/install") "install")
335 (("man/man1") "share/man/man1"))
336 #t))))
337 (build-system gnu-build-system)
338 (outputs '("out" "gui")) ;GTK+ interface in "gui"
339 (arguments
340 '(#:phases
341 (modify-phases %standard-phases
342 (replace 'configure
343 (lambda* (#:key outputs #:allow-other-keys)
344 (let ((out (assoc-ref outputs "out")))
345 (substitute* "Makefile"
346 (("prefix=.*")
347 (string-append "prefix := " out "\n"))))
348 #t))
349 (add-before 'install 'pre-install
350 (lambda* (#:key outputs #:allow-other-keys)
351 (let ((out (assoc-ref outputs "out")))
352 (mkdir-p (string-append out "/bin"))
353 (mkdir-p (string-append out "/share/man/man1")))
354 #t))
355 (add-after 'install 'post-install
356 (lambda* (#:key outputs #:allow-other-keys)
357 ;; Move the GTK+ interface to "gui".
358 (let ((out (assoc-ref outputs "out"))
359 (gui (assoc-ref outputs "gui")))
360 (mkdir-p (string-append gui "/bin"))
361 (rename-file (string-append out "/bin/gmp3info")
362 (string-append gui "/bin/gmp3info")))
363 #t)))
364 #:tests? #f))
365 (native-inputs
366 (list pkg-config))
367 (inputs
368 (list gtk+-2 ncurses))
369 (home-page "https://www.ibiblio.org/mp3info/")
370 (synopsis "MP3 technical info viewer and ID3 1.x tag editor")
371 (description
372 "MP3Info is a little utility used to read and modify the ID3 tags of MP3
373files. MP3Info can also display various technical aspects of an MP3 file
374including playing time, bit-rate, sampling frequency and other attributes in a
375pre-defined or user-specifiable output format.")
376 (license license:gpl2+)))
377
378(define-public libmp3splt
379 (package
380 (name "libmp3splt")
381 (version "0.9.2")
382 (source (origin
383 (method url-fetch)
384 (uri (string-append "mirror://sourceforge/mp3splt/libmp3splt/"
385 version "/libmp3splt-"
386 version ".tar.gz"))
387 (sha256
388 (base32
389 "1p1mn2hsmj5cp40fnc8g1yfvk72p8pjxi866gjdkgjsqrr7xdvih"))))
390 (build-system gnu-build-system)
391 (inputs (list flac
392 libid3tag
393 libmad
394 libogg
395 libltdl
396 libvorbis
397 pcre))
398 (native-inputs
399 (list pkg-config))
400 (synopsis "Library for splitting mp3 and ogg vorbis files")
401 (description
402 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
403and an end time position, without decoding. For splitting an album, one may
404select split points and file names manually or obtain them automatically from
405CDDB (internet or a local file) or from .cue files. The tool also supports
406automatic silence split, that can be used also to adjust cddb/cue splitpoints.
407
408This package contains the library.")
409 (license license:gpl2+)
410 (home-page "https://mp3splt.sourceforge.net/mp3splt_page/home.php")))
411
412(define-public mp3splt
413 (package
414 (name "mp3splt")
415 (version "2.6.2")
416 (source (origin
417 (method url-fetch)
418 (uri (string-append "mirror://sourceforge/mp3splt/mp3splt/"
419 version "/mp3splt-"
420 version ".tar.gz"))
421 (sha256
422 (base32
423 "1aiv20gypb6r84qabz8gblk8vi42cg3x333vk2pi3fyqvl82phry"))))
424 (build-system gnu-build-system)
425 (native-inputs (list pkg-config))
426 (inputs (list libmp3splt))
427 (synopsis "Utility for splitting mp3 and ogg vorbis files")
428 (description
429 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
430and an end time position, without decoding. For splitting an album, one may
431select split points and file names manually or obtain them automatically from
432CDDB (internet or a local file) or from .cue files. The tool also supports
433automatic silence split, that can be used also to adjust cddb/cue splitpoints.
434
435This package contains the binary.")
436 (license license:gpl2+)
437 (home-page "https://mp3splt.sourceforge.net/mp3splt_page/home.php")))
438
439(define-public mpg123
440 (package
441 (name "mpg123")
442 (version "1.33.5")
443 (source
444 (origin
445 (method url-fetch)
446 (uri (list (string-append "mirror://sourceforge/mpg123/mpg123/" version
447 "/mpg123-" version ".tar.bz2")
448 (string-append "https://www.mpg123.org/download/mpg123-"
449 version ".tar.bz2")))
450 (sha256
451 (base32 "1pfnz4wsgwwraj65ns2nn9dyw0p4vdm5lswc7hwcmwxgl26vqzhd"))))
452 (build-system gnu-build-system)
453 (arguments
454 (list
455 #:configure-flags
456 #~(list "--disable-components" "--enable-programs"
457 "--with-default-audio=pulse" "CFLAGS=-lmpg123 -lout123 -lsyn123")))
458 (native-inputs (list pkg-config))
459 (inputs (list libmpg123 libout123 libsyn123))
460 (home-page "https://www.mpg123.org/")
461 (synopsis "Console audio player")
462 (description
463 "Mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
4641,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested).")
465 (license license:lgpl2.1)))
466
467(define-public libmpg123
468 (package
469 (inherit mpg123)
470 (name "libmpg123")
471 (arguments
472 (list
473 #:configure-flags
474 #~(list "--disable-components" "--enable-libmpg123")))
475 (inputs '())
476 (synopsis "Decoder library")
477 (description
478 "Libmpg123 is a MPEG 1.0/2.0/2.5 audio decoder library for layers 1, 2
479and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested).")))
480
481(define-public libout123
482 (package
483 (inherit mpg123)
484 (name "libout123")
485 (arguments
486 (list
487 #:configure-flags
488 #~(list "--disable-components" "--enable-libout123"
489 "--enable-libout123-modules")))
490 (inputs (list alsa-lib pulseaudio))
491 (synopsis "Audio playback abstraction")
492 (description
493 "Libout123 is focused on continuous playback of audio streams
494via various platform-specific output methods. It glosses over details of the
495native APIs to give an interface close to simply writing data to a file. The
496focus of the library is to ease the use case of just getting raw audio data out
497there, without interruptions.")))
498
499(define-public libsyn123
500 (package
501 (inherit mpg123)
502 (name "libsyn123")
503 (arguments
504 (list
505 #:configure-flags
506 #~(list "--disable-components" "--enable-libsyn123")))
507 (inputs '())
508 (synopsis "Audio signal generation")
509 (description
510 "Libsyn123 provides functionality to generate synthetic audio signal
511data. It serves to verify the decoding of libmpg123 in automated testing.
512Libsyn123 offers:
513
514@itemize
515@item
516signal generation (mix of differing wave shapes, noise, a simulated Geiger
517counter)
518@item
519format conversion and channel mixing and amplification, with hard and soft
520clipping, also optional dithering
521@item
522near-zero-latency good-enough quite-fast resampling
523@item
524applying digital filters with user-provided coefficients
525@end itemize")))
526
527(define-public mpg321
528 (package
529 (name "mpg321")
530 (version "0.3.2")
531 (source (origin
532 (method url-fetch)
533 (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
534 version "/mpg321_" version ".orig.tar.gz"))
535 (file-name (string-append "mpg321-" version ".tar.gz"))
536 (sha256
537 (base32
538 "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))
539 (patches
540 (search-patches "mpg321-CVE-2019-14247.patch"
541 "mpg321-gcc-10.patch"))))
542 (build-system gnu-build-system)
543 (arguments
544 (list #:configure-flags
545 #~(list
546 ;; Relax gcc-14's strictness.
547 #$(string-append "CFLAGS=-g -O2"
548 " -Wno-error=implicit-function-declaration"
549 " -Wno-error=implicit-int"
550 " -Wno-error=int-conversion")
551 "--disable-alsa")))
552 (inputs
553 `(("zlib" ,zlib)
554 ("libmad" ,libmad)
555 ("libid3tag" ,libid3tag)
556 ("libao" ,ao)))
557 (home-page "https://mpg321.sourceforge.net/")
558 (synopsis "Command-line MP3 player")
559 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
560frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
561use with CD-recording software).")
562 (license license:gpl2)))
563
564(define-public lame
565 (package
566 (name "lame")
567 (version "3.100")
568 (source (origin
569 (method url-fetch)
570 (uri (string-append "mirror://sourceforge/lame/lame/"
571 (version-major+minor version) "/lame-"
572 version ".tar.gz"))
573 (sha256
574 (base32
575 "07nsn5sy3a8xbmw1bidxnsj5fj6kg9ai04icmqw40ybkp353dznx"))))
576 (build-system gnu-build-system)
577 (arguments
578 `(#:phases
579 (modify-phases %standard-phases
580 (add-after 'install 'install-pkg-config
581 (lambda* (#:key outputs #:allow-other-keys)
582 (let* ((out (assoc-ref outputs "out"))
583 (pkg-config-dir (string-append out "/lib/pkgconfig")))
584 (mkdir-p pkg-config-dir)
585 (with-output-to-file (string-append pkg-config-dir "/lame.pc")
586 (lambda _
587 (format #t
588 "prefix=~@*~a~@
589 libdir=${prefix}/lib~@
590 includedir=${prefix}/include~@
591
592 Name: lame~@
593 Description:~@
594 Version: ~a~@
595 Libs: -L${libdir} -lmp3lame~@
596 Cflags: -I${includedir}~%"
597 out ,version)))))))))
598 (home-page "https://lame.sourceforge.net/")
599 (synopsis "MPEG Audio Layer III (MP3) encoder")
600 (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
601 (license license:lgpl2.0)))
602
603(define-public ripperx
604 (package
605 (name "ripperx")
606 (version "2.8.0")
607 (source (origin
608 (method url-fetch)
609 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
610 version "/ripperx-"
611 version ".tar.bz2"))
612 (sha256
613 (base32
614 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
615 (patches (search-patches "ripperx-missing-file.patch"))))
616 (build-system gnu-build-system)
617 (propagated-inputs
618 (list font-ghostscript cdparanoia flac lame vorbis-tools))
619 (inputs
620 (list glib gtk+-2 id3lib taglib))
621 (native-inputs
622 (list pkg-config))
623 (synopsis "GTK program to rip and encode CD audio tracks")
624 (description
625 "RipperX is a GTK program to rip CD audio tracks and encode them to the
626Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
627a few mouse clicks to convert an entire album. It supports CDDB lookups
628for album and track information.")
629 (license license:gpl2)
630 (home-page "https://sourceforge.net/projects/ripperx/")))
631
632(define-public libmpcdec
633 (package
634 (name "libmpcdec")
635 (version "1.2.6")
636 (source (origin
637 (method url-fetch)
638 (uri (string-append
639 "https://files.musepack.net/source/libmpcdec-"
640 version ".tar.bz2"))
641 (sha256
642 (base32
643 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
644 (build-system gnu-build-system)
645 (synopsis "Decoding library for the Musepack audio format")
646 (description
647 "This library supports decoding of the Musepack (MPC) audio compression
648format.")
649 (license license:bsd-3)
650 (home-page "https://musepack.net")))
651
652(define-public mpc123
653 (package
654 (name "mpc123")
655 (version "0.2.4")
656 (source (origin
657 (method url-fetch)
658 (uri (list (string-append "mirror://sourceforge/mpc123/version%20"
659 version "/mpc123-" version ".tar.gz")
660 (string-append "mirror://debian/pool/main/m/" name
661 "/" name "_" version ".orig.tar.gz")))
662 (sha256
663 (base32
664 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
665 (patches (search-patches "mpc123-initialize-ao.patch"))))
666 (build-system gnu-build-system)
667 (arguments
668 '(#:phases
669 (modify-phases %standard-phases
670 (replace 'configure
671 (lambda _
672 (substitute* "Makefile"
673 (("CC[[:blank:]]*:=.*")
674 "CC := gcc\n"))
675
676 (setenv "CFLAGS" "-fcommon -g"))) ;allow compilation with GCC 10
677 (replace 'install
678 (lambda* (#:key outputs #:allow-other-keys)
679 (let* ((out (assoc-ref outputs "out"))
680 (bin (string-append out "/bin")))
681 (install-file "mpc123" bin)))))
682 #:tests? #f))
683 (native-inputs
684 `(("gettext" ,gettext-minimal)))
685 (inputs
686 `(("libao" ,ao)
687 ("libmpcdec" ,libmpcdec)))
688 (home-page "https://github.com/bucciarati/mpc123")
689 (synopsis "Audio player for Musepack-formatted files")
690 (description
691 "Mpc123 is a command-line player for files in the Musepack audio
692compression format (.mpc files).")
693 (license license:gpl2+)))
694
695(define-public eyed3
696 (package
697 (name "eyed3")
698 (version "0.9.8a5")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "eyed3" version))
703 (sha256
704 (base32 "0n3lbb3mm103zbid5mz958ibd2x0hiwmc9if8hbzck6x4gc4w34w"))))
705 (build-system pyproject-build-system)
706 (arguments
707 `(#:tests? #f)) ; the required test data contains copyrighted material
708 (native-inputs (list python-setuptools))
709 (propagated-inputs (list python-deprecation python-filetype))
710 (synopsis "MP3 tag ID3 metadata editor")
711 (description "eyeD3 is a Python tool for working with audio files,
712specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
713command-line tool (eyeD3) and a Python library (import eyed3) that can be used
714to write your own applications or plugins that are callable from the
715command-line tool.")
716 (home-page "https://eyed3.readthedocs.io/en/latest/")
717 (license license:gpl2+)))
718
719(define-public chromaprint
720 (package
721 (name "chromaprint")
722 (version "1.6.0")
723 (source (origin
724 (method url-fetch)
725 (uri (string-append
726 "https://github.com/acoustid/chromaprint/releases/download/v"
727 version "/chromaprint-" version ".tar.gz"))
728 (sha256
729 (base32 "1nj0rfr3vf926802jgd6p3il7yirc4vjqx6nl0vrlf51aqp4hcwx"))))
730 (build-system cmake-build-system)
731 (arguments
732 `(#:tests? #f ; tests require googletest *sources*
733 ;;#:configure-flags '("-DBUILD_TESTS=ON") ; for building the tests
734 #:configure-flags '("-DBUILD_TOOLS=ON"))) ; for fpcalc
735 (inputs
736 ;; requires one of FFmpeg (prefered), FFTW3 or vDSP
737 ;; use the same ffmpeg version as for acoustid-fingerprinter
738 (list ffmpeg boost))
739 (home-page "https://acoustid.org/chromaprint")
740 (synopsis "Audio fingerprinting library")
741 (description "Chromaprint is a library for calculating audio
742fingerprints which are used by the Acoustid service. Its main purpose
743is to provide an accurate identifier for record tracks.")
744 (license license:lgpl2.1+)))
745
746(define-public python-audioread
747 (package
748 (name "python-audioread")
749 (version "3.0.1")
750 (source
751 (origin
752 (method url-fetch)
753 (uri (pypi-uri "audioread" version))
754 (sha256
755 (base32 "0v866n5rwdz45ks8dlhl8hzx3p54hcjl0rz7x3rbsj4c96jn0m5c"))))
756 (build-system pyproject-build-system)
757 (arguments
758 (list #:phases #~(modify-phases %standard-phases
759 (add-after 'unpack 'fix-gst-init
760 (lambda _
761 ;; `None' is no longer accepted as of gstreamer
762 ;; 2.28.1.
763 (substitute* "audioread/gstdec.py"
764 (("Gst.init\\(None\\)")
765 "Gst.init([])")))))))
766 (propagated-inputs (list ffmpeg python-pygobject))
767 (native-inputs
768 (list gstreamer
769 gst-plugins-base
770 python-flit-core
771 python-pytest))
772 (home-page "https://github.com/sampsyo/audioread")
773 (synopsis "Decode audio files using whichever backend is available")
774 (description
775 "This package provides a Python library for audo decoding. It uses
776whatever audio backend is available, such as GStreamer, Core Audio, MAD,
777FFmpeg, etc.")
778 (license license:expat)))
779
780(define-public python-pyacoustid
781 (package
782 (name "python-pyacoustid")
783 (version "1.3.0")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "pyacoustid" version))
788 (sha256
789 (base32
790 "0xyikq3lqmqlm6b8nmmi6aijs4vz56svgcbhha8bp7n1j5qlhksz"))))
791 (build-system pyproject-build-system)
792 (arguments
793 (list
794 #:tests? #f ;No tests.
795 #:phases
796 #~(modify-phases %standard-phases
797 (add-after 'unpack 'chromaprint-path
798 (lambda* (#:key inputs #:allow-other-keys)
799 (substitute* "chromaprint.py"
800 (("libchromaprint.so.1")
801 (search-input-file inputs "/lib/libchromaprint.so.1")))
802 (substitute* "acoustid.py"
803 (("(FPCALC_COMMAND.+)fpcalc" _ prefix)
804 (string-append
805 prefix (search-input-file inputs "/bin/fpcalc")))))))))
806 (native-inputs
807 (list python-setuptools))
808 (inputs (list chromaprint))
809 (propagated-inputs
810 (list python-audioread python-requests))
811 (home-page "https://github.com/beetbox/pyacoustid")
812 (synopsis "Bindings for Chromaprint acoustic fingerprinting")
813 (description
814 "This package provides bindings for the Chromaprint acoustic
815fingerprinting library and the Acoustid API.")
816 (license license:expat)))
817
818(define-public python-pytaglib
819 (package
820 (name "python-pytaglib")
821 (version "3.1.0")
822 (source
823 (origin
824 (method git-fetch)
825 (uri (git-reference
826 (url "https://github.com/supermihi/pytaglib")
827 (commit (string-append "v" version))))
828 (file-name (git-file-name name version))
829 (sha256
830 (base32 "178vvc0rq932w9hmzb1cxlzhzfs5npibrpx41r0zidmhcpv4gr03"))))
831 (build-system pyproject-build-system)
832 (arguments
833 (list
834 #:phases
835 #~(modify-phases %standard-phases
836 ;; Ensure that the Cython file is regenerated.
837 (add-after 'unpack 'setup-environment
838 (lambda _
839 (setenv "PYTAGLIB_CYTHONIZE" "1"))))))
840 (native-inputs
841 (list python-cython
842 python-pytest
843 python-setuptools))
844 (inputs
845 (list taglib))
846 (home-page "https://github.com/supermihi/pytaglib")
847 (synopsis "Python bindings for taglib")
848 (description
849 "This package is a Python audio tagging library. It is cross-platform,
850 works with all Python versions, and is very simple to use yet fully featured.")
851 (license license:gpl3)))
852
853(define-public wavbreaker
854 (package
855 (name "wavbreaker")
856 (version "0.15")
857 (source (origin
858 (method git-fetch)
859 (uri (git-reference
860 (url "https://github.com/thp/wavbreaker/")
861 (commit version)))
862 (file-name (git-file-name name version))
863 (sha256
864 (base32 "16h0sfcb8av6a368giizzwv9m0lq5c3bnf4b9vyyh9nkbbsc7c3j"))))
865 (build-system meson-build-system)
866 (arguments
867 '(#:modules
868 ((guix build utils)
869 (guix build meson-build-system))
870
871 #:phases
872 (modify-phases %standard-phases
873 (add-after 'install 'wrap-program
874 ;; This wrapping is necessary to make wavbreaker find things it
875 ;; needs in pure environments.
876 (lambda* (#:key inputs outputs #:allow-other-keys)
877 (let ((out (assoc-ref outputs "out"))
878 (adwaita-icons (assoc-ref inputs "adwaita-icon-theme"))
879 (hicolor-icons (assoc-ref inputs "hicolor-icon-theme"))
880 (shared-mime (assoc-ref inputs "shared-mime-info")))
881 (wrap-program (string-append out "/bin/wavbreaker")
882 ;; Needed in order for wavbreakere to find the icons it needs
883 `("XDG_DATA_DIRS" ":" prefix
884 ,(map (lambda (package)
885 (string-append package "/share"))
886 `(,out ;for wavbreaker's icon
887 ,adwaita-icons
888 ,hicolor-icons
889 ,shared-mime)))
890 ;; This is necessary to load some pixbufs like Adwaita's
891 ;; check-symbolic.svg and wavbreaker's own logo in the
892 ;; 'about' section.
893 `("GDK_PIXBUF_MODULE_FILE" =
894 (,(getenv "GDK_PIXBUF_MODULE_FILE")))
895 ;; Needed for GTK's file chooser to not crash.
896 `("GSETTINGS_SCHEMA_DIR" =
897 (,(string-append (assoc-ref inputs "gtk+")
898 "/share/glib-2.0/schemas"))))))))))
899 (native-inputs
900 (list pkg-config cmake-minimal))
901 (inputs
902 (list glib
903 gtk+
904 ao
905 bash-minimal
906 adwaita-icon-theme
907 shared-mime-info
908 gsettings-desktop-schemas))
909 (home-page "https://wavbreaker.sourceforge.io/")
910 (synopsis "WAV and MP3 file splitter with a GUI")
911 (description
912 "Wavbreaker is a WAV and MP3 file splitter. It can be used to break up a
913WAV or MP3 audio file into multiple WAV files. Wavbreaker contains a helpful
914waveform display of the audio file being edited, to help the user in splitting
915the file at the right point. Wavbreaker also supports splitting MP3 files
916without re-encoding them, to preserve their original audio quality.")
917 (license license:gpl2+)))