gnu: varnish-modules: Update to 0.17.1 [fixes CVE-2021-28543].
[jackhill/guix/guix.git] / gnu / packages / mp3.scm
CommitLineData
d464e725
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
d2a7114e 3;;; Copyright © 2014, 2015, 2017, 2020 Ludovic Courtès <ludo@gnu.org>
c0eac5a8 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
d1cd67af 5;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
35e65701 6;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
89e1e448 7;;; Copyright © 2017, 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
a96c0086 8;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
8ce704b2 9;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
938bb06a 10;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
d464e725
AE
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages mp3)
b5b73a82 28 #:use-module ((guix licenses) #:prefix license:)
25352fe1 29 #:use-module (gnu packages)
d464e725 30 #:use-module (gnu packages autotools)
194782a8
MW
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages gcc)
9518fde1 33 #:use-module (gnu packages boost)
25352fe1 34 #:use-module (gnu packages cdrom)
8ce704b2 35 #:use-module (gnu packages check)
8cc9c0da 36 #:use-module (gnu packages compression)
54ff0b7d 37 #:use-module (gnu packages gettext)
25352fe1 38 #:use-module (gnu packages ghostscript)
68ff528c 39 #:use-module (gnu packages ncurses)
25352fe1
AE
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gtk)
c23e9e48
AE
42 #:use-module (gnu packages pcre)
43 #:use-module (gnu packages pkg-config)
13ef3e99 44 #:use-module (gnu packages python)
2577d934 45 #:use-module (gnu packages python-web)
44d10b1f 46 #:use-module (gnu packages python-xyz)
54ff0b7d 47 #:use-module (gnu packages xiph)
1bdb591b 48 #:use-module (gnu packages pulseaudio)
a82bec4e 49 #:use-module (gnu packages linux) ;alsa-lib
9518fde1 50 #:use-module (gnu packages video) ;ffmpeg
d464e725
AE
51 #:use-module (guix packages)
52 #:use-module (guix download)
89e1e448 53 #:use-module (guix git-download)
3d679ab1 54 #:use-module (guix utils)
086518dd 55 #:use-module (guix build-system gnu)
13ef3e99 56 #:use-module (guix build-system python)
086518dd 57 #:use-module (guix build-system cmake))
d464e725
AE
58
59(define-public libmad
60 (package
61 (name "libmad")
62 (version "0.15.1b")
63 (source (origin
64 (method url-fetch)
65 (uri (string-append "mirror://sourceforge/mad/libmad/"
66 version "/libmad-"
67 version ".tar.gz"))
68 (sha256
69 (base32
dd863f1f 70 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv"))
fc1adab1
AK
71 (patches (search-patches "libmad-armv7-thumb-pt1.patch"
72 "libmad-armv7-thumb-pt2.patch"
aac6c53a
MW
73 "libmad-md_size.patch"
74 "libmad-length-check.patch"
fc1adab1 75 "libmad-mips-newgcc.patch"))))
d464e725
AE
76 (build-system gnu-build-system)
77 (arguments
78 `(#:phases
dc1d3cde
KK
79 (modify-phases %standard-phases
80 (add-before 'configure 'remove-unsupported-gcc-flags
4f27a333
MB
81 (lambda _
82 ;; remove option that is not supported by gcc any more
83 (substitute* "configure" ((" -fforce-mem") ""))
83afa4e9 84 #t))
eb9d3667
KK
85 ;; Normally one should not add a pkg-config file if one is not provided
86 ;; by upstream developers, but Audacity expects a pkg-config file for
87 ;; this package, and other major GNU/Linux distributions already provide
88 ;; such a file.
83afa4e9
KK
89 (add-after 'install 'install-pkg-config
90 (lambda* (#:key outputs #:allow-other-keys)
91 (let* ((out (assoc-ref outputs "out"))
92 (pkg-config-dir (string-append out "/lib/pkgconfig")))
93 (mkdir-p pkg-config-dir)
94 (with-output-to-file (string-append pkg-config-dir "/mad.pc")
95 (lambda _
96 (format #t
97 "prefix=~@*~a~@
98 libdir=${prefix}/lib~@
99 includedir=${prefix}/include~@
100
101 Name: libmad~@
102 Description:~@
103 Version: ~a~@
104 Libs: -L${libdir} -lmad~@
105 Cflags: -I${includedir}~%"
106 out ,version)))))))))
35b9e423 107 (synopsis "MPEG audio decoder")
d464e725
AE
108 (description
109 "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to
110lower sampling frequencies, as well as the de facto MPEG 2.5 format.
111All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are
112fully implemented.
113
114This package contains the library.")
115 (license license:gpl2+)
296f091b 116 (home-page "https://www.underbit.com/products/mad/")))
d464e725 117
8cc9c0da
AE
118(define-public libid3tag
119 (package
120 (name "libid3tag")
121 (version "0.15.1b")
122 (source (origin
123 (method url-fetch)
124 (uri (string-append "mirror://sourceforge/mad/libid3tag/"
125 version "/libid3tag-"
126 version ".tar.gz"))
127 (sha256
128 (base32
129 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
130 (build-system gnu-build-system)
14e68191
KK
131 (arguments
132 `(#:phases
133 (modify-phases %standard-phases
ac3c4e32
KK
134 ;; Normally one should not add a pkg-config file if one is not provided
135 ;; by upstream developers, but Audacity expects a pkg-config file for
136 ;; this package, and other major GNU/Linux distributions already provide
137 ;; such a file.
14e68191
KK
138 (add-after 'install 'install-pkg-config
139 (lambda* (#:key outputs #:allow-other-keys)
140 (let* ((out (assoc-ref outputs "out"))
141 (pkg-config-dir (string-append out "/lib/pkgconfig")))
142 (mkdir-p pkg-config-dir)
143 (with-output-to-file (string-append pkg-config-dir "/id3tag.pc")
144 (lambda _
145 (format #t
146 "prefix=~@*~a~@
147 libdir=${prefix}/lib~@
148 includedir=${prefix}/include~@
149
150 Name: libid3tag~@
151 Description:~@
152 Version: ~a~@
153 Libs: -L${libdir} -lid3tag -lz~@
154 Cflags: -I${includedir}~%"
155 out ,version)))))))))
8cc9c0da 156 (inputs `(("zlib" ,zlib)))
35b9e423 157 (synopsis "Library for reading ID3 tags")
8cc9c0da 158 (description
35b9e423 159 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
e881752c 160versions of ID3v2.")
8cc9c0da 161 (license license:gpl2+)
296f091b 162 (home-page "https://www.underbit.com/products/mad/")))
8cc9c0da 163
fbd84457
AE
164(define-public id3lib
165 (package
166 (name "id3lib")
167 (version "3.8.3")
168 (source (origin
169 (method url-fetch)
170 (uri (string-append "mirror://sourceforge/id3lib/id3lib/"
1f521b70 171 version "/id3lib-" version ".tar.gz"))
fbd84457
AE
172 (sha256
173 (base32
1f521b70 174 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97"))
35e65701
TD
175 (modules '((guix build utils)))
176 ;; Don't use bundled zlib
6cbee49d 177 (snippet '(begin (delete-file-recursively "zlib") #t))
b5f6700f
PL
178 (patches (search-patches "id3lib-CVE-2007-4460.patch"
179 "id3lib-UTF16-writing-bug.patch"))))
fbd84457 180 (build-system gnu-build-system)
35e65701 181 (inputs `(("zlib" ,zlib)))
fbd84457
AE
182 (arguments
183 `(#:phases
dc1d3cde
KK
184 (modify-phases %standard-phases
185 (add-before 'configure 'apply-patches
186 ;; TODO: create a patch for origin instead?
187 (lambda _
188 (substitute* "configure"
189 (("iomanip.h") "")) ; drop check for unused header
190 ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
191 (substitute* "include/id3/id3lib_strings.h"
192 (("include <string>") "include <cstring>\n#include <string>"))
193 (substitute* "include/id3/writers.h"
194 (("//\\#include <string.h>") "#include <cstring>"))
195 (substitute* "examples/test_io.cpp"
196 (("dami;") "dami;\nusing namespace std;"))
197 #t)))))
35b9e423 198 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
fbd84457 199 (description
35b9e423
EB
200 "Id3lib is a cross-platform software development library for reading,
201writing, and manipulating ID3v1 and ID3v2 tags. It is an on-going project
fbd84457
AE
202whose primary goals are full compliance with the ID3v2 standard, portability
203across several platforms, and providing a powerful and feature-rich API with
204a highly stable and efficient implementation.")
205 (license license:lgpl2.0+)
206 (home-page "http://id3lib.sourceforge.net/")))
207
086518dd
LC
208(define-public taglib
209 (package
210 (name "taglib")
89e1e448 211 (version "1.12-beta-1")
086518dd 212 (source (origin
89e1e448
PL
213 (method git-fetch)
214 (uri (git-reference
215 (url "https://github.com/taglib/taglib")
216 (commit (string-append "v" version))))
217 (file-name (git-file-name name version))
086518dd
LC
218 (sha256
219 (base32
89e1e448 220 "1mp6w2ikniw8w6d5wr0h20j0ijg8jw7s9dli5a8k9znpznvxpym4"))))
086518dd 221 (build-system cmake-build-system)
d1451fa0
PL
222 (arguments
223 '(#:tests? #f ; Tests are not ran with BUILD_SHARED_LIBS on.
d2a7114e
LC
224 #:configure-flags (list "-DBUILD_SHARED_LIBS=ON")
225 #:phases (modify-phases %standard-phases
226 (add-before 'configure 'adjust-zlib-ldflags
227 (lambda* (#:key inputs #:allow-other-keys)
228 ;; Make sure users of 'taglib-config --libs' get the -L
229 ;; flag for zlib.
230 (substitute* "CMakeLists.txt"
231 (("set\\(ZLIB_LIBRARIES_FLAGS -lz\\)")
219e0a49 232 (string-append "set(ZLIB_LIBRARIES_FLAGS \"-L"
d2a7114e 233 (assoc-ref inputs "zlib")
219e0a49 234 "/lib -lz\")")))
d2a7114e 235 #t)))))
086518dd 236 (inputs `(("zlib" ,zlib)))
788425c2 237 (home-page "https://taglib.org")
086518dd
LC
238 (synopsis "Library to access audio file meta-data")
239 (description
240 "TagLib is a C++ library for reading and editing the meta-data of several
241popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
242files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
243Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.")
244
245 ;; Dual-licensed: user may choose between LGPLv2.1 or MPLv1.1.
246 (license (list license:lgpl2.1 license:mpl1.1))))
247
68ff528c
LC
248(define-public mp3info
249 (package
250 (name "mp3info")
251 (version "0.8.5a")
252 (source (origin
253 (method url-fetch)
254 (uri (string-append
296f091b 255 "https://ibiblio.org"
f8f8897f 256 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
68ff528c
LC
257 version ".tgz"))
258 (sha256
259 (base32
260 "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04"))
261 (modules '((guix build utils)))
262 (snippet
6cbee49d
MW
263 '(begin
264 (substitute* "Makefile"
265 (("/bin/rm") "rm")
266 (("/usr/bin/install") "install")
267 (("man/man1") "share/man/man1"))
268 #t))))
68ff528c
LC
269 (build-system gnu-build-system)
270 (outputs '("out" "gui")) ;GTK+ interface in "gui"
271 (arguments
dc1d3cde
KK
272 '(#:phases
273 (modify-phases %standard-phases
274 (replace 'configure
275 (lambda* (#:key outputs #:allow-other-keys)
276 (let ((out (assoc-ref outputs "out")))
277 (substitute* "Makefile"
278 (("prefix=.*")
279 (string-append "prefix := " out "\n"))))
280 #t))
281 (add-before 'install 'pre-install
282 (lambda* (#:key outputs #:allow-other-keys)
283 (let ((out (assoc-ref outputs "out")))
284 (mkdir-p (string-append out "/bin"))
285 (mkdir-p (string-append out "/share/man/man1")))
286 #t))
287 (add-after 'install 'post-install
288 (lambda* (#:key outputs #:allow-other-keys)
289 ;; Move the GTK+ interface to "gui".
290 (let ((out (assoc-ref outputs "out"))
291 (gui (assoc-ref outputs "gui")))
292 (mkdir-p (string-append gui "/bin"))
293 (rename-file (string-append out "/bin/gmp3info")
294 (string-append gui "/bin/gmp3info")))
295 #t)))
68ff528c
LC
296 #:tests? #f))
297 (native-inputs
298 `(("pkg-config" ,pkg-config)))
299 (inputs
300 `(("gtk+" ,gtk+-2)
301 ("ncurses" ,ncurses)))
296f091b 302 (home-page "https://www.ibiblio.org/mp3info/")
68ff528c
LC
303 (synopsis "MP3 technical info viewer and ID3 1.x tag editor")
304 (description
305 "MP3Info is a little utility used to read and modify the ID3 tags of MP3
e881752c 306files. MP3Info can also display various technical aspects of an MP3 file
68ff528c
LC
307including playing time, bit-rate, sampling frequency and other attributes in a
308pre-defined or user-specifiable output format.")
309 (license license:gpl2+)))
310
c23e9e48
AE
311(define-public libmp3splt
312 (package
313 (name "libmp3splt")
67a8298c 314 (version "0.9.2")
c23e9e48
AE
315 (source (origin
316 (method url-fetch)
317 (uri (string-append "mirror://sourceforge/mp3splt/libmp3splt/"
318 version "/libmp3splt-"
319 version ".tar.gz"))
320 (sha256
321 (base32
67a8298c 322 "1p1mn2hsmj5cp40fnc8g1yfvk72p8pjxi866gjdkgjsqrr7xdvih"))))
c23e9e48 323 (build-system gnu-build-system)
0d5d1bdf
MB
324 (inputs `(("flac" ,flac)
325 ("libid3tag" ,libid3tag)
c23e9e48
AE
326 ("libmad" ,libmad)
327 ("libogg" ,libogg)
3246cc91 328 ("libltdl" ,libltdl)
e881752c 329 ("libvorbis" ,libvorbis)
c23e9e48 330 ("pcre" ,pcre)))
c4c4cc05
JD
331 (native-inputs
332 `(("pkg-config" ,pkg-config)))
35b9e423 333 (synopsis "Library for splitting mp3 and ogg vorbis files")
c23e9e48
AE
334 (description
335 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
35b9e423 336and an end time position, without decoding. For splitting an album, one may
e881752c 337select split points and file names manually or obtain them automatically from
35b9e423 338CDDB (internet or a local file) or from .cue files. The tool also supports
c23e9e48
AE
339automatic silence split, that can be used also to adjust cddb/cue splitpoints.
340
341This package contains the library.")
342 (license license:gpl2+)
343 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
344
345(define-public mp3splt
346 (package
347 (name "mp3splt")
2041f901 348 (version "2.6.2")
c23e9e48
AE
349 (source (origin
350 (method url-fetch)
351 (uri (string-append "mirror://sourceforge/mp3splt/mp3splt/"
352 version "/mp3splt-"
353 version ".tar.gz"))
354 (sha256
355 (base32
2041f901 356 "1aiv20gypb6r84qabz8gblk8vi42cg3x333vk2pi3fyqvl82phry"))))
c23e9e48 357 (build-system gnu-build-system)
2041f901 358 (native-inputs `(("pkg-config" ,pkg-config)))
c23e9e48 359 (inputs `(("libmp3splt" ,libmp3splt)))
e881752c 360 (synopsis "Utility for splitting mp3 and ogg vorbis files")
c23e9e48
AE
361 (description
362 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
35b9e423 363and an end time position, without decoding. For splitting an album, one may
e881752c 364select split points and file names manually or obtain them automatically from
35b9e423 365CDDB (internet or a local file) or from .cue files. The tool also supports
c23e9e48
AE
366automatic silence split, that can be used also to adjust cddb/cue splitpoints.
367
368This package contains the binary.")
369 (license license:gpl2+)
370 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
371
1bdb591b
LC
372(define-public mpg123
373 (package
374 (name "mpg123")
1d165922 375 (version "1.26.4")
fa3e71d6
NG
376 (source
377 (origin
378 (method url-fetch)
379 (uri (list (string-append "mirror://sourceforge/mpg123/mpg123/"
380 version "/mpg123-" version ".tar.bz2")
381 (string-append
382 "https://www.mpg123.org/download/mpg123-"
383 version ".tar.bz2")))
384 (sha256
1d165922 385 (base32 "0m34hjssgslcsns8lj1n7f32iyiw547qgba9j2r6d9pp1ma92688"))))
1bdb591b
LC
386 (build-system gnu-build-system)
387 (arguments '(#:configure-flags '("--with-default-audio=pulse")))
fa3e71d6
NG
388 (native-inputs
389 `(("pkg-config" ,pkg-config)))
390 (inputs
391 `(("alsa-lib" ,alsa-lib)
392 ("pulseaudio" ,pulseaudio)))
53a416d6 393 (home-page "https://www.mpg123.org/")
1bdb591b
LC
394 (synopsis "Console MP3 player and decoder library")
395 (description
35b9e423 396 "Mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
1bdb591b
LC
3971,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). It comes with a
398command-line tool as well as a C library, libmpg123.")
399 (license license:lgpl2.1)))
400
0a56fadb
LC
401(define-public mpg321
402 (package
403 (name "mpg321")
5ed7f28d 404 (version "0.3.2")
0a56fadb
LC
405 (source (origin
406 (method url-fetch)
de67e922 407 (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
0a56fadb
LC
408 version "/mpg321-" version ".tar.gz"))
409 (sha256
410 (base32
5ed7f28d 411 "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))))
0a56fadb
LC
412 (build-system gnu-build-system)
413 (arguments '(#:configure-flags '("--disable-alsa")))
414 (inputs
415 `(("zlib" ,zlib)
416 ("libmad" ,libmad)
417 ("libid3tag" ,libid3tag)
418 ("libao" ,ao)))
419 (home-page "http://mpg321.sourceforge.net/")
420 (synopsis "Command-line MP3 player")
35b9e423 421 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
0a56fadb
LC
422frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
423use with CD-recording software).")
424 (license license:gpl2)))
2ae92cbc
AE
425
426(define-public lame
427 (package
428 (name "lame")
3d679ab1 429 (version "3.100")
2ae92cbc
AE
430 (source (origin
431 (method url-fetch)
3d679ab1
MB
432 (uri (string-append "mirror://sourceforge/lame/lame/"
433 (version-major+minor version) "/lame-"
2ae92cbc
AE
434 version ".tar.gz"))
435 (sha256
436 (base32
3d679ab1 437 "07nsn5sy3a8xbmw1bidxnsj5fj6kg9ai04icmqw40ybkp353dznx"))))
2ae92cbc 438 (build-system gnu-build-system)
fc5f56ea
KK
439 (arguments
440 `(#:phases
441 (modify-phases %standard-phases
442 (add-after 'install 'install-pkg-config
443 (lambda* (#:key outputs #:allow-other-keys)
444 (let* ((out (assoc-ref outputs "out"))
445 (pkg-config-dir (string-append out "/lib/pkgconfig")))
446 (mkdir-p pkg-config-dir)
447 (with-output-to-file (string-append pkg-config-dir "/lame.pc")
448 (lambda _
449 (format #t
450 "prefix=~@*~a~@
451 libdir=${prefix}/lib~@
452 includedir=${prefix}/include~@
453
454 Name: lame~@
455 Description:~@
456 Version: ~a~@
457 Libs: -L${libdir} -lmp3lame~@
458 Cflags: -I${includedir}~%"
459 out ,version)))))))))
2ae92cbc
AE
460 (home-page "http://lame.sourceforge.net/")
461 (synopsis "MPEG Audio Layer III (MP3) encoder")
462 (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
463 (license license:lgpl2.0)))
25352fe1
AE
464
465(define-public ripperx
466 (package
467 (name "ripperx")
d0dfc066 468 (version "2.8.0")
25352fe1
AE
469 (source (origin
470 (method url-fetch)
471 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
d0dfc066
AE
472 version "/ripperx-"
473 version ".tar.bz2"))
25352fe1
AE
474 (sha256
475 (base32
d0dfc066 476 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
fc1adab1 477 (patches (search-patches "ripperx-missing-file.patch"))))
25352fe1
AE
478 (build-system gnu-build-system)
479 (propagated-inputs
480 `(("gs-fonts" ,gs-fonts)
481 ("cdparanoia" ,cdparanoia)
482 ("flac" ,flac)
483 ("lame" ,lame)
484 ("vorbis-tools" ,vorbis-tools)))
485 (inputs
01eafd38 486 `(("glib" ,glib)
8b0275b6 487 ("gtk+" ,gtk+-2)
d0dfc066
AE
488 ("id3lib" ,id3lib)
489 ("taglib" ,taglib)))
c4c4cc05
JD
490 (native-inputs
491 `(("pkg-config" ,pkg-config)))
25352fe1
AE
492 (synopsis "GTK program to rip and encode CD audio tracks")
493 (description
494 "RipperX is a GTK program to rip CD audio tracks and encode them to the
35b9e423
EB
495Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
496a few mouse clicks to convert an entire album. It supports CDDB lookups
25352fe1
AE
497for album and track information.")
498 (license license:gpl2)
3b3b60d0 499 (home-page "https://sourceforge.net/projects/ripperx/")))
8f0fd238
LC
500
501(define-public libmpcdec
502 (package
503 (name "libmpcdec")
504 (version "1.2.6")
505 (source (origin
506 (method url-fetch)
507 (uri (string-append
296f091b 508 "https://files.musepack.net/source/libmpcdec-"
8f0fd238
LC
509 version ".tar.bz2"))
510 (sha256
511 (base32
512 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
513 (build-system gnu-build-system)
514 (synopsis "Decoding library for the Musepack audio format")
515 (description
516 "This library supports decoding of the Musepack (MPC) audio compression
517format.")
518 (license license:bsd-3)
296f091b 519 (home-page "https://musepack.net")))
8f0fd238
LC
520
521(define-public mpc123
522 (package
523 (name "mpc123")
524 (version "0.2.4")
525 (source (origin
526 (method url-fetch)
d1cd67af
EF
527 (uri (list (string-append "mirror://sourceforge/mpc123/version%20"
528 version "/mpc123-" version ".tar.gz")
529 (string-append "mirror://debian/pool/main/m/" name
530 "/" name "_" version ".orig.tar.gz")))
8f0fd238
LC
531 (sha256
532 (base32
86d07a55 533 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
fc1adab1 534 (patches (search-patches "mpc123-initialize-ao.patch"))))
8f0fd238
LC
535 (build-system gnu-build-system)
536 (arguments
1a847b70
EF
537 '(#:phases
538 (modify-phases %standard-phases
539 (replace 'configure
540 (lambda _
541 (substitute* "Makefile"
542 (("CC[[:blank:]]*:=.*")
543 "CC := gcc\n"))))
544 (replace 'install
545 (lambda* (#:key outputs #:allow-other-keys)
546 (let* ((out (assoc-ref outputs "out"))
547 (bin (string-append out "/bin")))
1a847b70 548 (install-file "mpc123" bin)))))
8f0fd238 549 #:tests? #f))
8f0fd238 550 (native-inputs
b94a6ca0 551 `(("gettext" ,gettext-minimal)))
8f0fd238
LC
552 (inputs
553 `(("libao" ,ao)
554 ("libmpcdec" ,libmpcdec)))
d1cd67af 555 (home-page "https://github.com/bucciarati/mpc123")
8f0fd238
LC
556 (synopsis "Audio player for Musepack-formatted files")
557 (description
35b9e423 558 "Mpc123 is a command-line player for files in the Musepack audio
e881752c 559compression format (.mpc files).")
8f0fd238 560 (license license:gpl2+)))
13ef3e99
LF
561
562(define-public eyed3
563 (package
564 (name "eyed3")
a96c0086 565 (version "0.8.12")
7c64cc7a
TGR
566 (source
567 (origin
568 (method url-fetch)
569 (uri (pypi-uri "eyeD3" version))
570 (sha256
a96c0086 571 (base32 "0vabr7hh6vy1w8gn35vmx9qwiyrfv734d5ahifg7x3pv0c5fqkp5"))))
13ef3e99
LF
572 (build-system python-build-system)
573 (arguments
7c64cc7a 574 `(#:tests? #f)) ; the required test data contains copyrighted material
33485fa9 575 (propagated-inputs
1825ce80
LF
576 `(("python-grako" ,python-grako)
577 ("python-magic" ,python-magic)
578 ("python-pathlib" ,python-pathlib)
579 ("python-six" ,python-six)))
13ef3e99
LF
580 (synopsis "MP3 tag ID3 metadata editor")
581 (description "eyeD3 is a Python tool for working with audio files,
582specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
583command-line tool (eyeD3) and a Python library (import eyed3) that can be used
584to write your own applications or plugins that are callable from the
585command-line tool.")
998100e6 586 (home-page "https://eyed3.readthedocs.io/en/latest/")
13ef3e99 587 (license license:gpl2+)))
9518fde1
HG
588
589(define-public chromaprint
590 (package
591 (name "chromaprint")
938bb06a 592 (version "1.5.0")
9518fde1
HG
593 (source (origin
594 (method url-fetch)
595 (uri (string-append
1f577b46
TGR
596 "https://github.com/acoustid/chromaprint/releases/download/v"
597 version "/chromaprint-" version ".tar.gz"))
9518fde1 598 (sha256
3694a9b3 599 (base32
938bb06a 600 "0sknmyl5254rc55bvkhfwpl4dfvz45xglk1rq8zq5crmwq058fjp"))))
9518fde1
HG
601 (build-system cmake-build-system)
602 (arguments
603 `(#:tests? #f ; tests require googletest *sources*
604 ;;#:configure-flags '("-DBUILD_TESTS=ON") ; for building the tests
a509041f 605 #:configure-flags '("-DBUILD_TOOLS=ON") ; for fpcalc
9518fde1
HG
606 #:test-target "check"))
607 (inputs
608 ;; requires one of FFmpeg (prefered), FFTW3 or vDSP
609 ;; use the same ffmpeg version as for acoustid-fingerprinter
610 `(("ffmpeg" ,ffmpeg)
60e1de6d 611 ("boost" ,boost)))
9518fde1
HG
612 (home-page "https://acoustid.org/chromaprint")
613 (synopsis "Audio fingerprinting library")
614 (description "Chromaprint is a library for calculating audio
615fingerprints which are used by the Acoustid service. Its main purpose
616is to provide an accurate identifier for record tracks.")
617 (license license:lgpl2.1+)))
8ce704b2
RW
618
619(define-public python-audioread
620 (package
621 (name "python-audioread")
48951e85 622 (version "2.1.9")
8ce704b2
RW
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "audioread" version))
627 (sha256
48951e85 628 (base32 "129hab8x9sb3plff2bkq4xnzc3i8k9rgcm1a36l813kc0m10wj53"))))
8ce704b2
RW
629 (build-system python-build-system)
630 (arguments `(#:tests? #f)) ; there is no "audiofile" fixture
631 (native-inputs
632 `(("python-pytest" ,python-pytest)
633 ("python-pytest-runner" ,python-pytest-runner)))
634 (home-page "https://github.com/sampsyo/audioread")
635 (synopsis "Decode audio files using whichever backend is available")
636 (description
637 "This package provides a Python library for audo decoding. It uses
638whatever audio backend is available, such as GStreamer, Core Audio, MAD,
639FFmpeg, etc.")
640 (license license:expat)))
2577d934
RW
641
642(define-public python-pyacoustid
643 (package
644 (name "python-pyacoustid")
645 (version "1.1.7")
646 (source
647 (origin
648 (method url-fetch)
649 (uri (pypi-uri "pyacoustid" version))
650 (sha256
651 (base32
652 "1zan6c22ca6sjy0g9ajwjp6mkzw7jv8r3n7jzska09a6x254lf87"))))
653 (build-system python-build-system)
654 (propagated-inputs
655 `(("python-audioread" ,python-audioread)
656 ("python-requests" ,python-requests)))
657 (home-page "https://github.com/sampsyo/pyacoustid")
658 (synopsis "Bindings for Chromaprint acoustic fingerprinting")
659 (description
660 "This package provides bindings for the Chromaprint acoustic
661fingerprinting library and the Acoustid API.")
662 (license license:expat)))
4c41dd99
MB
663
664(define-public python-pytaglib
665 (package
666 (name "python-pytaglib")
667 (version "1.4.6")
668 (source
669 (origin
670 (method url-fetch)
671 (uri (pypi-uri "pytaglib" version))
672 (sha256
673 (base32
674 "0li970qslfymz4vk1wrij2nfqw3l15cpc3fjjci48mpvg17gbnhn"))
675 ;; Delete file generated by Cython.
676 (modules '((guix build utils)))
677 (snippet
678 '(begin
679 (delete-file "src/taglib.cpp")))))
680 (build-system python-build-system)
681 (arguments
682 '(#:phases
683 (modify-phases %standard-phases
684 ;; Ensure that the Cython file is regenerated.
685 (add-after 'unpack 'setup-environment
686 (lambda _
687 (setenv "PYTAGLIB_CYTHONIZE" "1"))))))
688 (native-inputs
689 `(("python-cython" ,python-cython)
690 ("python-pytest" ,python-pytest)))
691 (inputs
692 `(("taglib" ,taglib)))
693 (home-page
694 "https://github.com/supermihi/pytaglib")
695 (synopsis
696 "Python bindings for taglib")
697 (description
698 "This package is a Python audio tagging library. It is
699cross-platform, works with all Python versions, and is very
700simple to use yet fully featured.")
701 (license license:gpl3)))