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