projects/guix·blob kernel-updates · refs

914 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.7")
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 "1vh3via7ipfajl6yzmmc7rnmshxl5c3c79mxbsdyqrx59idf7l1i"))))
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/inherit mpg123
469 (name "libmpg123")
470 (arguments
471 (list
472 #:configure-flags
473 #~(list "--disable-components" "--enable-libmpg123")))
474 (inputs '())
475 (synopsis "Decoder library")
476 (description
477 "Libmpg123 is a MPEG 1.0/2.0/2.5 audio decoder library for layers 1, 2
478and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested).")))
479
480(define-public libout123
481 (package/inherit mpg123
482 (name "libout123")
483 (arguments
484 (list
485 #:configure-flags
486 #~(list "--disable-components" "--enable-libout123"
487 "--enable-libout123-modules")))
488 (inputs (list alsa-lib pulseaudio))
489 (synopsis "Audio playback abstraction")
490 (description
491 "Libout123 is focused on continuous playback of audio streams
492via various platform-specific output methods. It glosses over details of the
493native APIs to give an interface close to simply writing data to a file. The
494focus of the library is to ease the use case of just getting raw audio data out
495there, without interruptions.")))
496
497(define-public libsyn123
498 (package/inherit mpg123
499 (name "libsyn123")
500 (arguments
501 (list
502 #:configure-flags
503 #~(list "--disable-components" "--enable-libsyn123")))
504 (inputs '())
505 (synopsis "Audio signal generation")
506 (description
507 "Libsyn123 provides functionality to generate synthetic audio signal
508data. It serves to verify the decoding of libmpg123 in automated testing.
509Libsyn123 offers:
510
511@itemize
512@item
513signal generation (mix of differing wave shapes, noise, a simulated Geiger
514counter)
515@item
516format conversion and channel mixing and amplification, with hard and soft
517clipping, also optional dithering
518@item
519near-zero-latency good-enough quite-fast resampling
520@item
521applying digital filters with user-provided coefficients
522@end itemize")))
523
524(define-public mpg321
525 (package
526 (name "mpg321")
527 (version "0.3.2")
528 (source (origin
529 (method url-fetch)
530 (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
531 version "/mpg321_" version ".orig.tar.gz"))
532 (file-name (string-append "mpg321-" version ".tar.gz"))
533 (sha256
534 (base32
535 "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))
536 (patches
537 (search-patches "mpg321-CVE-2019-14247.patch"
538 "mpg321-gcc-10.patch"))))
539 (build-system gnu-build-system)
540 (arguments
541 (list #:configure-flags
542 #~(list
543 ;; Relax gcc-14's strictness.
544 #$(string-append "CFLAGS=-g -O2"
545 " -Wno-error=implicit-function-declaration"
546 " -Wno-error=implicit-int"
547 " -Wno-error=int-conversion")
548 "--disable-alsa")))
549 (inputs
550 `(("zlib" ,zlib)
551 ("libmad" ,libmad)
552 ("libid3tag" ,libid3tag)
553 ("libao" ,ao)))
554 (home-page "https://mpg321.sourceforge.net/")
555 (synopsis "Command-line MP3 player")
556 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
557frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
558use with CD-recording software).")
559 (license license:gpl2)))
560
561(define-public lame
562 (package
563 (name "lame")
564 (version "3.100")
565 (source (origin
566 (method url-fetch)
567 (uri (string-append "mirror://sourceforge/lame/lame/"
568 (version-major+minor version) "/lame-"
569 version ".tar.gz"))
570 (sha256
571 (base32
572 "07nsn5sy3a8xbmw1bidxnsj5fj6kg9ai04icmqw40ybkp353dznx"))))
573 (build-system gnu-build-system)
574 (arguments
575 `(#:phases
576 (modify-phases %standard-phases
577 (add-after 'install 'install-pkg-config
578 (lambda* (#:key outputs #:allow-other-keys)
579 (let* ((out (assoc-ref outputs "out"))
580 (pkg-config-dir (string-append out "/lib/pkgconfig")))
581 (mkdir-p pkg-config-dir)
582 (with-output-to-file (string-append pkg-config-dir "/lame.pc")
583 (lambda _
584 (format #t
585 "prefix=~@*~a~@
586 libdir=${prefix}/lib~@
587 includedir=${prefix}/include~@
588
589 Name: lame~@
590 Description:~@
591 Version: ~a~@
592 Libs: -L${libdir} -lmp3lame~@
593 Cflags: -I${includedir}~%"
594 out ,version)))))))))
595 (home-page "https://lame.sourceforge.net/")
596 (synopsis "MPEG Audio Layer III (MP3) encoder")
597 (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
598 (license license:lgpl2.0)))
599
600(define-public ripperx
601 (package
602 (name "ripperx")
603 (version "2.8.0")
604 (source (origin
605 (method url-fetch)
606 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
607 version "/ripperx-"
608 version ".tar.bz2"))
609 (sha256
610 (base32
611 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
612 (patches (search-patches "ripperx-missing-file.patch"))))
613 (build-system gnu-build-system)
614 (propagated-inputs
615 (list font-ghostscript cdparanoia flac lame vorbis-tools))
616 (inputs
617 (list glib gtk+-2 id3lib taglib))
618 (native-inputs
619 (list pkg-config))
620 (synopsis "GTK program to rip and encode CD audio tracks")
621 (description
622 "RipperX is a GTK program to rip CD audio tracks and encode them to the
623Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
624a few mouse clicks to convert an entire album. It supports CDDB lookups
625for album and track information.")
626 (license license:gpl2)
627 (home-page "https://sourceforge.net/projects/ripperx/")))
628
629(define-public libmpcdec
630 (package
631 (name "libmpcdec")
632 (version "1.2.6")
633 (source (origin
634 (method url-fetch)
635 (uri (string-append
636 "https://files.musepack.net/source/libmpcdec-"
637 version ".tar.bz2"))
638 (sha256
639 (base32
640 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
641 (build-system gnu-build-system)
642 (synopsis "Decoding library for the Musepack audio format")
643 (description
644 "This library supports decoding of the Musepack (MPC) audio compression
645format.")
646 (license license:bsd-3)
647 (home-page "https://musepack.net")))
648
649(define-public mpc123
650 (package
651 (name "mpc123")
652 (version "0.2.4")
653 (source (origin
654 (method url-fetch)
655 (uri (list (string-append "mirror://sourceforge/mpc123/version%20"
656 version "/mpc123-" version ".tar.gz")
657 (string-append "mirror://debian/pool/main/m/" name
658 "/" name "_" version ".orig.tar.gz")))
659 (sha256
660 (base32
661 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
662 (patches (search-patches "mpc123-initialize-ao.patch"))))
663 (build-system gnu-build-system)
664 (arguments
665 '(#:phases
666 (modify-phases %standard-phases
667 (replace 'configure
668 (lambda _
669 (substitute* "Makefile"
670 (("CC[[:blank:]]*:=.*")
671 "CC := gcc\n"))
672
673 (setenv "CFLAGS" "-fcommon -g"))) ;allow compilation with GCC 10
674 (replace 'install
675 (lambda* (#:key outputs #:allow-other-keys)
676 (let* ((out (assoc-ref outputs "out"))
677 (bin (string-append out "/bin")))
678 (install-file "mpc123" bin)))))
679 #:tests? #f))
680 (native-inputs
681 `(("gettext" ,gettext-minimal)))
682 (inputs
683 `(("libao" ,ao)
684 ("libmpcdec" ,libmpcdec)))
685 (home-page "https://github.com/bucciarati/mpc123")
686 (synopsis "Audio player for Musepack-formatted files")
687 (description
688 "Mpc123 is a command-line player for files in the Musepack audio
689compression format (.mpc files).")
690 (license license:gpl2+)))
691
692(define-public eyed3
693 (package
694 (name "eyed3")
695 (version "0.9.8a5")
696 (source
697 (origin
698 (method url-fetch)
699 (uri (pypi-uri "eyed3" version))
700 (sha256
701 (base32 "0n3lbb3mm103zbid5mz958ibd2x0hiwmc9if8hbzck6x4gc4w34w"))))
702 (build-system pyproject-build-system)
703 (arguments
704 `(#:tests? #f)) ; the required test data contains copyrighted material
705 (native-inputs (list python-setuptools))
706 (propagated-inputs (list python-deprecation python-filetype))
707 (synopsis "MP3 tag ID3 metadata editor")
708 (description "eyeD3 is a Python tool for working with audio files,
709specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
710command-line tool (eyeD3) and a Python library (import eyed3) that can be used
711to write your own applications or plugins that are callable from the
712command-line tool.")
713 (home-page "https://eyed3.readthedocs.io/en/latest/")
714 (license license:gpl2+)))
715
716(define-public chromaprint
717 (package
718 (name "chromaprint")
719 (version "1.6.0")
720 (source (origin
721 (method url-fetch)
722 (uri (string-append
723 "https://github.com/acoustid/chromaprint/releases/download/v"
724 version "/chromaprint-" version ".tar.gz"))
725 (sha256
726 (base32 "1nj0rfr3vf926802jgd6p3il7yirc4vjqx6nl0vrlf51aqp4hcwx"))))
727 (build-system cmake-build-system)
728 (arguments
729 `(#:tests? #f ; tests require googletest *sources*
730 ;;#:configure-flags '("-DBUILD_TESTS=ON") ; for building the tests
731 #:configure-flags '("-DBUILD_TOOLS=ON"))) ; for fpcalc
732 (inputs
733 ;; requires one of FFmpeg (prefered), FFTW3 or vDSP
734 ;; use the same ffmpeg version as for acoustid-fingerprinter
735 (list ffmpeg boost))
736 (home-page "https://acoustid.org/chromaprint")
737 (synopsis "Audio fingerprinting library")
738 (description "Chromaprint is a library for calculating audio
739fingerprints which are used by the Acoustid service. Its main purpose
740is to provide an accurate identifier for record tracks.")
741 (license license:lgpl2.1+)))
742
743(define-public python-audioread
744 (package
745 (name "python-audioread")
746 (version "3.0.1")
747 (source
748 (origin
749 (method url-fetch)
750 (uri (pypi-uri "audioread" version))
751 (sha256
752 (base32 "0v866n5rwdz45ks8dlhl8hzx3p54hcjl0rz7x3rbsj4c96jn0m5c"))))
753 (build-system pyproject-build-system)
754 (arguments
755 (list #:phases #~(modify-phases %standard-phases
756 (add-after 'unpack 'fix-gst-init
757 (lambda _
758 ;; `None' is no longer accepted as of gstreamer
759 ;; 2.28.1.
760 (substitute* "audioread/gstdec.py"
761 (("Gst.init\\(None\\)")
762 "Gst.init([])")))))))
763 (propagated-inputs (list ffmpeg python-pygobject))
764 (native-inputs
765 (list gstreamer
766 gst-plugins-base
767 python-flit-core
768 python-pytest))
769 (home-page "https://github.com/sampsyo/audioread")
770 (synopsis "Decode audio files using whichever backend is available")
771 (description
772 "This package provides a Python library for audo decoding. It uses
773whatever audio backend is available, such as GStreamer, Core Audio, MAD,
774FFmpeg, etc.")
775 (license license:expat)))
776
777(define-public python-pyacoustid
778 (package
779 (name "python-pyacoustid")
780 (version "1.3.0")
781 (source
782 (origin
783 (method url-fetch)
784 (uri (pypi-uri "pyacoustid" version))
785 (sha256
786 (base32
787 "0xyikq3lqmqlm6b8nmmi6aijs4vz56svgcbhha8bp7n1j5qlhksz"))))
788 (build-system pyproject-build-system)
789 (arguments
790 (list
791 #:tests? #f ;No tests.
792 #:phases
793 #~(modify-phases %standard-phases
794 (add-after 'unpack 'chromaprint-path
795 (lambda* (#:key inputs #:allow-other-keys)
796 (substitute* "chromaprint.py"
797 (("libchromaprint.so.1")
798 (search-input-file inputs "/lib/libchromaprint.so.1")))
799 (substitute* "acoustid.py"
800 (("(FPCALC_COMMAND.+)fpcalc" _ prefix)
801 (string-append
802 prefix (search-input-file inputs "/bin/fpcalc")))))))))
803 (native-inputs
804 (list python-setuptools))
805 (inputs (list chromaprint))
806 (propagated-inputs
807 (list python-audioread python-requests))
808 (home-page "https://github.com/beetbox/pyacoustid")
809 (synopsis "Bindings for Chromaprint acoustic fingerprinting")
810 (description
811 "This package provides bindings for the Chromaprint acoustic
812fingerprinting library and the Acoustid API.")
813 (license license:expat)))
814
815(define-public python-pytaglib
816 (package
817 (name "python-pytaglib")
818 (version "3.1.0")
819 (source
820 (origin
821 (method git-fetch)
822 (uri (git-reference
823 (url "https://github.com/supermihi/pytaglib")
824 (commit (string-append "v" version))))
825 (file-name (git-file-name name version))
826 (sha256
827 (base32 "178vvc0rq932w9hmzb1cxlzhzfs5npibrpx41r0zidmhcpv4gr03"))))
828 (build-system pyproject-build-system)
829 (arguments
830 (list
831 #:phases
832 #~(modify-phases %standard-phases
833 ;; Ensure that the Cython file is regenerated.
834 (add-after 'unpack 'setup-environment
835 (lambda _
836 (setenv "PYTAGLIB_CYTHONIZE" "1"))))))
837 (native-inputs
838 (list python-cython
839 python-pytest
840 python-setuptools))
841 (inputs
842 (list taglib))
843 (home-page "https://github.com/supermihi/pytaglib")
844 (synopsis "Python bindings for taglib")
845 (description
846 "This package is a Python audio tagging library. It is cross-platform,
847 works with all Python versions, and is very simple to use yet fully featured.")
848 (license license:gpl3)))
849
850(define-public wavbreaker
851 (package
852 (name "wavbreaker")
853 (version "0.15")
854 (source (origin
855 (method git-fetch)
856 (uri (git-reference
857 (url "https://github.com/thp/wavbreaker/")
858 (commit version)))
859 (file-name (git-file-name name version))
860 (sha256
861 (base32 "16h0sfcb8av6a368giizzwv9m0lq5c3bnf4b9vyyh9nkbbsc7c3j"))))
862 (build-system meson-build-system)
863 (arguments
864 '(#:modules
865 ((guix build utils)
866 (guix build meson-build-system))
867
868 #:phases
869 (modify-phases %standard-phases
870 (add-after 'install 'wrap-program
871 ;; This wrapping is necessary to make wavbreaker find things it
872 ;; needs in pure environments.
873 (lambda* (#:key inputs outputs #:allow-other-keys)
874 (let ((out (assoc-ref outputs "out"))
875 (adwaita-icons (assoc-ref inputs "adwaita-icon-theme"))
876 (hicolor-icons (assoc-ref inputs "hicolor-icon-theme"))
877 (shared-mime (assoc-ref inputs "shared-mime-info")))
878 (wrap-program (string-append out "/bin/wavbreaker")
879 ;; Needed in order for wavbreakere to find the icons it needs
880 `("XDG_DATA_DIRS" ":" prefix
881 ,(map (lambda (package)
882 (string-append package "/share"))
883 `(,out ;for wavbreaker's icon
884 ,adwaita-icons
885 ,hicolor-icons
886 ,shared-mime)))
887 ;; This is necessary to load some pixbufs like Adwaita's
888 ;; check-symbolic.svg and wavbreaker's own logo in the
889 ;; 'about' section.
890 `("GDK_PIXBUF_MODULE_FILE" =
891 (,(getenv "GDK_PIXBUF_MODULE_FILE")))
892 ;; Needed for GTK's file chooser to not crash.
893 `("GSETTINGS_SCHEMA_DIR" =
894 (,(string-append (assoc-ref inputs "gtk+")
895 "/share/glib-2.0/schemas"))))))))))
896 (native-inputs
897 (list pkg-config cmake-minimal))
898 (inputs
899 (list glib
900 gtk+
901 ao
902 bash-minimal
903 adwaita-icon-theme
904 shared-mime-info
905 gsettings-desktop-schemas))
906 (home-page "https://wavbreaker.sourceforge.io/")
907 (synopsis "WAV and MP3 file splitter with a GUI")
908 (description
909 "Wavbreaker is a WAV and MP3 file splitter. It can be used to break up a
910WAV or MP3 audio file into multiple WAV files. Wavbreaker contains a helpful
911waveform display of the audio file being edited, to help the user in splitting
912the file at the right point. Wavbreaker also supports splitting MP3 files
913without re-encoding them, to preserve their original audio quality.")
914 (license license:gpl2+)))