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