Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / cdrom.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
5 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
6 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
8 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
9 ;;; Copyright © 2017 John Darrington <jmd@gnu.org>
10 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
11 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2017 ng0 <ng0@n0.is>
13 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
14 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
15 ;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
16 ;;;
17 ;;; This file is part of GNU Guix.
18 ;;;
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
23 ;;;
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
28 ;;;
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32 (define-module (gnu packages cdrom)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix packages)
36 #:use-module ((guix licenses) #:select (lgpl2.1+ gpl2 gpl2+ gpl3+ cddl1.0))
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system glib-or-gtk)
40 #:use-module (guix gexp)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages acl)
43 #:use-module (gnu packages audio)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages flex)
47 #:use-module (gnu packages fontutils)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages docbook)
50 #:use-module (gnu packages xml)
51 #:use-module (gnu packages gtk)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages m4)
54 #:use-module (gnu packages man)
55 #:use-module (gnu packages mp3)
56 #:use-module (gnu packages music)
57 #:use-module (gnu packages ncurses)
58 #:use-module (gnu packages elf)
59 #:use-module (gnu packages wxwidgets)
60 #:use-module (gnu packages linux)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages readline)
63 #:use-module (gnu packages base)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages perl-web)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages image)
68 #:use-module (gnu packages photo)
69 #:use-module (gnu packages video)
70 #:use-module (gnu packages wget)
71 #:use-module (gnu packages xiph))
72
73 (define-public libcddb
74 (package
75 (name "libcddb")
76 (version "1.3.2")
77 (source (origin
78 (method url-fetch)
79 (uri (string-append "mirror://sourceforge/libcddb/libcddb/" version
80 "/libcddb-" version ".tar.bz2"))
81 (sha256
82 (base32
83 "0fr21a7vprdyy1bq6s99m0x420c9jm5fipsd63pqv8qyfkhhxkim"))))
84 (build-system gnu-build-system)
85 (arguments '(#:tests? #f)) ; tests rely on access to external servers
86 (home-page "http://libcddb.sourceforge.net/")
87 (synopsis "C library to access data on a CDDB server")
88 (description
89 "Libcddb is a C library to access data on a CDDB server (freedb.org). It
90 allows you to:
91
92 1. search the database for possible CD matches;
93
94 2. retrieve detailed information about a specific CD;
95
96 3. submit new CD entries to the database.
97
98 Libcddb supports both the custom CDDB protocol and tunnelling the query and
99 read operations over plain HTTP. It is also possible to use an HTTP proxy
100 server. If you want to speed things up, you can make use of the built-in
101 caching facility provided by the library.")
102 (license lgpl2.1+)))
103
104 (define-public libcdio
105 (package
106 (name "libcdio")
107 (version "2.0.0")
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "mirror://gnu/libcdio/libcdio-"
111 version ".tar.bz2"))
112 (sha256
113 (base32
114 "0jr8ppdm80c533nzmrpz3iffnpc6nhvsria1di9f4jg1l19a03fd"))))
115 (build-system gnu-build-system)
116 (inputs
117 `(("ncurses" ,ncurses)
118 ("libcddb" ,libcddb)))
119 (native-inputs
120 `(("help2man" ,help2man)
121 ("pkg-config" ,pkg-config)))
122 (home-page "https://www.gnu.org/software/libcdio/")
123 (synopsis "CD Input and Control library")
124 (description
125 "The GNU Compact Disc Input and Control Library (libcdio) is a library
126 for CD-ROM and CD image file access. It allows the developer to add CD
127 access to an application without having to worry about the OS- and
128 device-dependent properties of CD-ROM or the specific details of CD image
129 formats. It includes pycdio, a Python interface to libcdio, and
130 libcdio-paranoia, a library providing jitter-free and error-free audio
131 extraction from CDs.")
132 (license gpl3+)))
133
134 (define-public libcdio-paranoia
135 (package
136 (name "libcdio-paranoia")
137 (version "10.2+0.94+2")
138 (source (origin
139 (method url-fetch)
140 (uri (string-append "mirror://gnu/libcdio/libcdio-paranoia-"
141 version ".tar.gz"))
142 (sha256
143 (base32
144 "0h8rr1ir05r29rgawa1ccw335668k4s3zq4yg9095svyx7n843yn"))))
145 (build-system gnu-build-system)
146 (native-inputs `(("pkg-config" ,pkg-config)))
147 (propagated-inputs `(("libcdio" ,libcdio)))
148 (home-page "https://www.gnu.org/software/libcdio/")
149 (synopsis "Jitter- and error-tolerant CD audio extraction")
150 (description
151 "libcdio-paranoia is an implementation of CD paranoia libraries based on
152 libcdio.")
153 (license gpl3+)))
154
155 (define-public xorriso
156 (package
157 (name "xorriso")
158 (version "1.5.0")
159 (source (origin
160 (method url-fetch)
161 (uri (string-append "mirror://gnu/xorriso/xorriso-"
162 version ".tar.gz"))
163 (sha256
164 (base32
165 "0aq6lvlwlkxz56l5sbvgycr6j5c82ch2bv6zrnc2345ibfpafgx9"))))
166 (build-system gnu-build-system)
167 (inputs
168 `(("acl" ,acl)
169 ("readline" ,readline)
170 ("zlib" ,zlib)))
171 (home-page "https://www.gnu.org/software/xorriso/")
172 (synopsis "Create, manipulate, burn ISO-9660 file systems")
173 (description
174 "GNU Xorriso is a tool for copying files to and from ISO 9660 Rock
175 Ridge, a.k.a. Compact Disc File System, file systems and it allows
176 session-wise manipulation of them. It features a formatter and burner for
177 CD, DVD and BD. It can operate on existing ISO images or it can create new
178 ones. xorriso can then be used to copy files directly into or out of ISO
179 files.")
180 (license gpl3+)))
181
182 (define-public cdparanoia
183 (package
184 (name "cdparanoia")
185 (version "10.2")
186 (source (origin
187 (method url-fetch)
188 (uri (string-append "http://downloads.xiph.org/releases/"
189 "cdparanoia/cdparanoia-III-"
190 version ".src.tgz"))
191 (sha256
192 (base32
193 "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80"))
194 (patches (search-patches "cdparanoia-fpic.patch"))
195 (modules '((guix build utils)))
196 (snippet
197 '(begin
198 ;; Make libraries respect LDFLAGS.
199 (substitute* '("paranoia/Makefile.in" "interface/Makefile.in")
200 (("-Wl,-soname") "$(LDFLAGS) -Wl,-soname"))
201 #t))))
202 (build-system gnu-build-system)
203 (arguments
204 `(#:tests? #f ; there is no check target
205 #:configure-flags ; Add $libdir to the RUNPATH of all the executables.
206 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
207 (home-page "http://www.xiph.org/paranoia/")
208 (synopsis "Audio CD reading utility")
209 (description "Cdparanoia retrieves audio tracks from CDDA capable CDROM
210 drives. The data can be saved to a file or directed to standard output
211 in WAV, AIFF, AIFF-C or raw format. Most ATAPI, SCSI and several
212 proprietary CDROM drive makes are supported; cdparanoia can determine if the
213 target drive is CDDA capable. In addition to simple reading, cdparanoia adds
214 extra-robust data verification, synchronization, error handling and scratch
215 reconstruction capability.")
216 (license gpl2))) ; libraries under lgpl2.1
217
218 (define-public cdrtools
219 (package
220 (name "cdrtools")
221 (version "3.01")
222 (source (origin
223 (method url-fetch)
224 (uri (string-append
225 "mirror://sourceforge/cdrtools/cdrtools-" version ".tar.bz2"))
226 (sha256
227 (base32
228 "03w6ypsmwwy4d7vh6zgwpc60v541vc5ywp8bdb758hbc4yv2wa7d"))
229 (modules '((guix build utils)))
230 (snippet
231 '(begin
232 ;; By default 'cdda2wav --help' would print a string like
233 ;; "Version 3.01_linux_4.19.10-gnu_x86_64_x86_64". Change
234 ;; it to not capture the kernel version of the build
235 ;; machine, to allow for reproducible builds.
236 (substitute* "cdda2wav/local.cnf.in"
237 (("^VERSION_OS=.*")
238 (string-append
239 "actual_os := $(shell uname -o)\n"
240 "actual_arch := $(shell uname -m)\n"
241 "VERSION_OS = _$(actual_os)_$(actual_arch)\n")))
242 #t))
243 (patches (search-patches "cdrtools-3.01-mkisofs-isoinfo.patch"))))
244 (build-system gnu-build-system)
245 ;; XXX cdrtools bundles a modified, relicensed early version of cdparanoia.
246 (inputs
247 `(("linux-headers" ,linux-libre-headers)))
248 (arguments
249 `(#:make-flags
250 (list "RM=rm" "LN=ln" "SYMLINK=ln -s"
251 "CONFIG_SHELL=sh" "CCOM=gcc"
252 (string-append "INS_BASE=" (assoc-ref %outputs "out"))
253 (string-append "INS_RBASE=" (assoc-ref %outputs "out")))
254 ;; Parallel builds appear to be unsafe, see
255 ;; https://hydra.gnu.org/build/3346840/log/raw
256 #:parallel-build? #f
257 #:phases
258 (modify-phases %standard-phases
259 (delete 'configure)
260 (add-before 'build 'set-linux-headers
261 (lambda _
262 (substitute* "autoconf/configure"
263 (("/usr/src/linux")
264 (assoc-ref %build-inputs "linux-headers")))
265 #t))
266 (add-before 'build 'substitute-dirs
267 (lambda _
268 (substitute* (append (find-files "DEFAULTS" "^Defaults\\.")
269 (find-files "DEFAULTS_ENG" "^Defaults\\.")
270 (find-files "TEMPLATES" "^Defaults\\."))
271 (("/opt/schily") (assoc-ref %outputs "out")))
272 #t)))
273 #:tests? #f)) ; no tests
274 (synopsis "Command line utilities to manipulate and burn CD/DVD/BD images")
275 (description "cdrtools is a collection of command line utilities to create
276 CD's, DVD's or Blue Ray discs. The most important components are
277 @command{cdrecord}, a burning program, @command{cdda2wav}, a CD audio ripper
278 which uses libparanoia, and @command{mkisofs}, which can create various disc
279 images.")
280 (home-page "http://cdrtools.sourceforge.net/private/cdrecord.html")
281
282 ;; mkisofs is GPL, the other programs are CDDL.
283 (license (list cddl1.0 gpl2))))
284
285 (define-public dvd+rw-tools
286 (package
287 (name "dvd+rw-tools")
288 (version "7.1")
289 (source (origin
290 (method url-fetch)
291 (uri (string-append
292 "http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-"
293 version ".tar.gz"))
294 (sha256
295 (base32
296 "1jkjvvnjcyxpql97xjjx0kwvy70kxpiznr2zpjy2hhci5s10zmpq"))
297 (patches (search-patches "dvd+rw-tools-add-include.patch"))))
298 (build-system gnu-build-system)
299 (inputs
300 `(("cdrtools" ,cdrtools)))
301 (native-inputs
302 `(("m4" ,m4)))
303 (arguments
304 `(#:tests? #f ; No tests.
305 #:phases
306 (modify-phases %standard-phases
307 (add-after 'unpack 'fix-glibc-compatability
308 (lambda* (#:key inputs #:allow-other-keys)
309 ;; We use sed --in-place because substitute* cannot handle the
310 ;; character encoding used by growisofs.c.
311 (invoke "sed" "-i" "-e"
312 (string-append
313 "s,<sys/stat.h>,"
314 "<sys/stat.h>\\\n#include <sys/sysmacros.h>,")
315 "growisofs.c")))
316 (replace 'configure
317 (lambda _ (setenv "prefix" (assoc-ref %outputs "out")) #t))
318 (add-before 'build 'embed-mkisofs
319 (lambda* (#:key inputs #:allow-other-keys)
320 ;; We use sed --in-place because substitute* cannot handle the
321 ;; character encoding used by growisofs.c.
322 (invoke "sed" "-i" "-e"
323 (string-append
324 "s,\"mkisofs\","
325 "\"" (which "mkisofs") "\",")
326 "growisofs.c"))))))
327 (home-page "http://fy.chalmers.se/~appro/linux/DVD+RW/")
328 (synopsis "DVD and Blu-ray Disc burning tools")
329 (description "dvd+rw-tools, mostly known for its command
330 @command{growisofs}, is a collection of DVD and Blu-ray Disc burning tools.
331 It requires another program, such as @command{mkisofs}, @command{genisoimage},
332 or @command{xorrisofs} to create ISO 9660 images.")
333 (license gpl2)))
334
335 (define-public dvdisaster
336 (package
337 (name "dvdisaster")
338 (version "0.79.5")
339 (source (origin
340 (method url-fetch)
341 (uri (string-append "http://dvdisaster.net/downloads/dvdisaster-"
342 version ".tar.bz2"))
343 (sha256
344 (base32
345 "0f8gjnia2fxcbmhl8b3qkr5b7idl8m855dw7xw2fnmbqwvcm6k4w"))))
346 (build-system gnu-build-system)
347 (inputs
348 `(("gtk+" ,gtk+-2)))
349 (native-inputs
350 `(("gettext" ,gettext-minimal)
351 ("pkg-config" ,pkg-config)
352 ("which" ,which)))
353 (arguments
354 `(;; Parallel builds appear to be unsafe, see
355 ;; <http://hydra.gnu.org/build/49331/nixlog/1/raw>.
356 #:parallel-build? #f
357 #:phases
358 (modify-phases %standard-phases
359 (replace 'check
360 (lambda _
361 (with-directory-excursion "regtest"
362 (substitute* "common.bash"
363 (("ISODIR=/var/tmp/regtest") "ISODIR=/tmp"))
364 (for-each invoke (find-files "." "rs.*\\.bash")))
365 #t))
366 (add-after 'install 'install-desktop
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let* ((datadir (string-append (assoc-ref outputs "out") "/share")))
369 (substitute* "contrib/dvdisaster.desktop"
370 (("dvdisaster48.png") "dvdisaster.png"))
371 (install-file "contrib/dvdisaster.desktop"
372 (string-append datadir "/applications"))
373 (for-each
374 (lambda (png)
375 (let* ((size (substring png
376 (string-index png char-set:digit)
377 (string-rindex png #\.)))
378 (icondir (string-append datadir "/icons/"
379 size "x" size "/apps")))
380 (mkdir-p icondir)
381 (copy-file png (string-append icondir "/dvdisaster.png"))))
382 (find-files "contrib" "dvdisaster[0-9]*\\.png"))
383 (mkdir-p (string-append datadir "/pixmaps"))
384 (copy-file "contrib/dvdisaster48.xpm"
385 (string-append datadir "/pixmaps/dvdisaster.xpm"))
386 #t))))))
387 (home-page "http://dvdisaster.net/en/index.html")
388 (synopsis "Error correcting codes for optical media images")
389 (description "Optical media (CD,DVD,BD) keep their data only for a
390 finite time (typically for many years). After that time, data loss develops
391 slowly with read errors growing from the outer media region towards the
392 inside.
393
394 Dvdisaster stores data on CD/DVD/BD (supported media) in a way that it is
395 fully recoverable even after some read errors have developed. This enables
396 you to rescue the complete data to a new medium.
397
398 Data loss is prevented by using error correcting codes. Error correction
399 data is either added to the medium or kept in separate error correction
400 files. Dvdisaster works at the image level so that the recovery does not
401 depend on the file system of the medium. The maximum error correction
402 capacity is user-selectable.")
403 (license gpl2+)))
404
405 (define-public dvdstyler
406 (package
407 (name "dvdstyler")
408 (version "3.0.4")
409 (source
410 (origin
411 (method url-fetch)
412 (uri (string-append "mirror://sourceforge/dvdstyler/dvdstyler/"
413 version "/DVDStyler-" version ".tar.bz2"))
414 (sha256
415 (base32
416 "0lwc0hn94m9r8fi07sjqz3fr618l6lnw3zsakxw7nlgnxbjsk7pi"))))
417 (build-system gnu-build-system)
418 (arguments
419 `(#:configure-flags
420 (list (string-append "XMLTO="
421 (assoc-ref %build-inputs "xmlto")
422 "/bin/xmlto --searchpath "
423 (assoc-ref %build-inputs "docbook-xsl")
424 "/xml/xsl/docbook-xsl-" ,(package-version docbook-xsl)
425 "/htmlhelp:"
426 (assoc-ref %build-inputs "docbook-xml")
427 "/xml/dtd/docbook"))
428 #:phases
429 (modify-phases %standard-phases
430 (add-after 'install 'wrap-program
431 (lambda* (#:key inputs outputs #:allow-other-keys)
432 (wrap-program (string-append (assoc-ref outputs "out") "/bin/dvdstyler")
433 `("PATH" ":" prefix
434 (,(string-join
435 (map (lambda (in) (string-append (assoc-ref inputs in) "/bin"))
436 '("cdrtools" "dvdauthor" "dvd+rw-tools" "ffmpeg"))
437 ":"))))
438 #t)))
439 #:tests? #f)) ; No tests.
440 (inputs ; TODO package bundled wxvillalib
441 `(("wxwidgets" ,wxwidgets-3.1)
442 ("wssvg" ,wxsvg)
443 ("dbus" ,dbus)
444 ("cdrtools" ,cdrtools)
445 ("dvd+rw-tools" ,dvd+rw-tools)
446 ("dvdauthor" ,dvdauthor)
447 ("eudev" ,eudev)
448 ("fontconfig" ,fontconfig)
449 ("libexif" ,libexif)
450 ("libjpeg" ,libjpeg)
451 ("ffmpeg" ,ffmpeg-3.4)))
452 (native-inputs
453 `(("pkg-config" ,pkg-config)
454 ("flex" ,flex)
455 ("python" ,python-2)
456 ("xmlto" ,xmlto)
457 ("gettext" ,gnu-gettext)
458 ("docbook-xml" ,docbook-xml)
459 ("docbook-xsl" ,docbook-xsl)
460 ("zip" ,zip)))
461 (synopsis "DVD authoring application")
462 (description "DVDStyler is a DVD authoring application which allows users
463 to burn video files in many formats to DVD discs, complete with individually
464 designed menus. It can be used to create professional-looking DVD's with
465 custom buttons, backgrounds and animations, from within a user-friendly
466 graphical interface.")
467 (home-page "https://www.dvdstyler.org")
468 (license gpl2)))
469
470 (define-public libcue
471 (package
472 (name "libcue")
473 (version "2.2.1")
474 (source (origin
475 (method git-fetch)
476 (uri (git-reference
477 (url "https://github.com/lipnitsk/libcue.git")
478 (commit (string-append "v" version))))
479 (file-name (git-file-name name version))
480 (sha256
481 (base32
482 "1iqw4n01rv2jyk9lksagyxj8ml0kcfwk67n79zy1r6zv1xfp5ywm"))))
483 (build-system cmake-build-system)
484 (arguments
485 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
486 (native-inputs
487 `(("bison" ,bison)
488 ("flex" ,flex)))
489 (home-page "https://github.com/lipnitsk/libcue")
490 (synopsis "C library to parse cue sheets")
491 (description "Libcue is a C library to parse so-called @dfn{cue sheets}
492 which contain meta-data for CD/DVD tracks. It provides an API to manipulate
493 the data.")
494 (license gpl2+)))
495
496 (define-public cd-discid
497 (package
498 (name "cd-discid")
499 (version "1.4")
500 (home-page "http://linukz.org/cd-discid.shtml")
501 (source (origin
502 (method url-fetch)
503 (uri (string-append "http://linukz.org/download/cd-discid-"
504 version ".tar.gz"))
505 (sha256
506 (base32
507 "0qrcvn7227qaayjcd5rm7z0k5q89qfy5qkdgwr5pd7ih0va8rmpz"))
508 (modules '((guix build utils)))
509 (snippet
510 '(begin
511 (substitute* "Makefile"
512 (("/usr/bin/install")
513 "install"))
514 #t))))
515 (build-system gnu-build-system)
516 (arguments
517 '(#:tests? #f
518 #:phases (modify-phases %standard-phases (delete 'configure))
519 #:make-flags (list "CC=gcc"
520 (string-append "PREFIX="
521 (assoc-ref %outputs "out")))))
522 (synopsis "Get CDDB discid information from an audio CD")
523 (description
524 "cd-discid is a command-line tool to retrieve CDDB discid information
525 from an audio CD.")
526 (license gpl2+)))
527
528 (define-public abcde
529 (package
530 (name "abcde")
531 (version "2.9.3")
532 (home-page "https://abcde.einval.com/")
533 (source (origin
534 (method url-fetch)
535 (uri (string-append home-page "/download/abcde-"
536 version ".tar.gz"))
537 (sha256
538 (base32
539 "091ip2iwb6b67bhjsj05l0sxyq2whqjycbzqpkfbpm4dlyxx0v04"))
540 (modules '((guix build utils)))
541 (snippet
542 '(begin
543 (substitute* "Makefile"
544 (("/usr/bin/install")
545 "install"))
546 #t))))
547 (build-system gnu-build-system)
548 (arguments
549 '(#:phases
550 (modify-phases %standard-phases
551 (replace 'configure
552 (lambda* (#:key outputs inputs #:allow-other-keys)
553 (substitute* "Makefile"
554 (("^prefix = .*$")
555 (string-append "prefix = "
556 (assoc-ref outputs "out")
557 "\n"))
558 (("^sysconfdir = .*$")
559 (string-append "sysconfdir = "
560 (assoc-ref outputs "out")
561 "/etc/\n")))
562 #t))
563 (add-after 'install 'wrap
564 (lambda* (#:key inputs outputs #:allow-other-keys)
565 (let ((wget (assoc-ref inputs "wget"))
566 (vorbis (assoc-ref inputs "vorbis-tools"))
567 (parano (assoc-ref inputs "cdparanoia"))
568 (which (assoc-ref inputs "which"))
569 (discid (assoc-ref inputs "cd-discid"))
570 (perl-discid (assoc-ref inputs "perl-musicbrainz-discid"))
571 (perl-ws (assoc-ref inputs "perl-webservice-musicbrainz"))
572 (perl-mojo (assoc-ref inputs "perl-mojolicious"))
573 (flac (assoc-ref inputs "flac"))
574 (out (assoc-ref outputs "out")))
575 (define (wrap file)
576 (wrap-program file
577 `("PATH" ":" prefix
578 (,(string-append out "/bin:"
579 wget "/bin:"
580 flac "/bin:"
581 which "/bin:"
582 vorbis "/bin:"
583 discid "/bin:"
584 parano "/bin")))
585 `("PERL5LIB" ":" prefix
586 (,(string-append perl-discid
587 "/lib/perl5/site_perl:"
588 perl-ws
589 "/lib/perl5/site_perl:"
590 perl-mojo
591 "/lib/perl5/site_perl")))))
592
593 (for-each wrap
594 (find-files (string-append out "/bin")
595 ".*")))
596 #t)))
597 #:tests? #f)) ; no test target
598
599 (inputs `(("wget" ,wget)
600 ("which" ,which)
601 ("cdparanoia" ,cdparanoia)
602 ("cd-discid" ,cd-discid)
603 ("vorbis-tools" ,vorbis-tools)
604 ("flac" ,flac)
605
606 ("perl-musicbrainz-discid" ,perl-musicbrainz-discid)
607 ("perl-webservice-musicbrainz" ,perl-webservice-musicbrainz)
608 ("perl-mojolicious" ,perl-mojolicious) ;indirect dependency
609
610 ;; A couple of Python and Perl scripts are included.
611 ("python" ,python)
612 ("perl" ,perl)))
613
614 (synopsis "Command-line audio CD ripper")
615 (description
616 "abcde is a front-end command-line utility (actually, a shell script)
617 that grabs tracks off a CD, encodes them to Ogg/Vorbis, MP3, FLAC, Ogg/Speex
618 and/or MPP/MP+ (Musepack) format, and tags them, all in one go.")
619 (license gpl2+)))
620
621 (define-public geteltorito
622 (package
623 (name "geteltorito")
624 (version "0.6")
625 (home-page
626 "https://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/")
627 (source (origin
628 (method url-fetch)
629 (uri (string-append home-page name "-" version ".tar.gz"))
630 (sha256
631 (base32
632 "1gkbm9ahj2mgqrkrfpibzclsriqgsbsvjh19fr815vpd9f6snkxv"))))
633 (build-system gnu-build-system)
634 (arguments
635 `(#:tests? #f ; No tests.
636 #:phases
637 (modify-phases %standard-phases
638 (delete 'configure)
639 (delete 'build)
640 (replace 'install
641 (lambda* (#:key outputs #:allow-other-keys)
642 (let ((out (assoc-ref outputs "out")))
643 (install-file "geteltorito"
644 (string-append out "/bin"))))))))
645 (inputs `(("perl" ,perl)))
646 (synopsis "Extract the boot image from a CD-ROM")
647 (description
648 "@command{geteltorito} can extract the initial/default boot
649 image from CDs (and ISOs) that follow the El Torito specification
650 for bootable CD-ROMs.
651
652 Image data is written to standard output by default and all other
653 information is written to standard error.")
654 (license gpl2+)))
655
656 (define-public asunder
657 (package
658 (name "asunder")
659 (version "2.8")
660 (source (origin
661 (method url-fetch)
662 (uri
663 (string-append "http://www.littlesvr.ca/asunder/releases/asunder-"
664 version
665 ".tar.bz2"))
666 (sha256
667 (base32
668 "1nq9kd4rd4k2kibf57gdbm0zw2gxa234vvvdhxkm8g5bhx5h3iyq"))))
669 (build-system glib-or-gtk-build-system)
670 (arguments
671 '(#:out-of-source? #f
672 #:phases (modify-phases %standard-phases
673 (add-after 'install 'wrap
674 (lambda* (#:key inputs outputs #:allow-other-keys)
675 (let ((program (string-append (assoc-ref outputs "out")
676 "/bin/asunder")))
677 (define (bin-directory input-name)
678 (string-append (assoc-ref inputs input-name) "/bin"))
679 (wrap-program program
680 `("PATH" ":" prefix
681 ,(map bin-directory (list "cdparanoia"
682 "lame"
683 "vorbis-tools"
684 "flac"
685 "opus-tools"
686 "wavpack"))))))))))
687 (native-inputs `(("intltool" ,intltool)
688 ("pkg-config" ,pkg-config)))
689 ;; TODO: Add the necessary packages for Musepack encoding.
690 (inputs `(("gtk+-2" ,gtk+-2)
691 ("glib" ,glib)
692 ("libcddb" ,libcddb)
693 ("cdparanoia" ,cdparanoia)
694 ("lame" ,lame)
695 ("vorbis-tools" ,vorbis-tools)
696 ("flac" ,flac)
697 ("opus-tools" ,opus-tools)
698 ("wavpack" ,wavpack)))
699 (home-page "http://www.littlesvr.ca/asunder/")
700 (synopsis "Graphical audio CD ripper and encoder")
701 (description
702 "Asunder is a graphical audio CD ripper and encoder. It can save audio
703 tracks as WAV, MP3, Ogg Vorbis, FLAC, Opus, Wavpack, and Musepack. It can use
704 CDDB to name and tag each track automatically, and it allows for each track to
705 be by a different artist. Asunder can encode to multiple formats in one
706 session, and it can create M3U playlists.")
707 (license gpl2)))
708
709 (define-public ripit
710 (package
711 (name "ripit")
712 (version "3.9.0")
713 (source (origin
714 (method url-fetch)
715 (uri (string-append "http://www.suwald.com/ripit/ripit-"
716 version ".tar.gz"))
717 (sha256
718 (base32
719 "0ap71x477jy9c4jiqazb3y45hxdxm3jbq24x05g3vjyqzigi4x1b"))))
720 (build-system gnu-build-system)
721 (arguments
722 `(#:tests? #f ; No test suite.
723 #:phases
724 (modify-phases %standard-phases
725 (delete 'configure)
726 (add-after 'unpack 'patch-usr-bin-install
727 (lambda* (#:key inputs outputs #:allow-other-keys)
728 (substitute* "Makefile"
729 (("/usr/bin/install") (string-append
730 (assoc-ref inputs "coreutils")
731 "/bin/install"))
732 (("\\$\\(DESTDIR\\)/usr/local") (assoc-ref outputs "out"))
733 (("../../etc") "etc")))))))
734 (native-inputs
735 `(("coreutils" ,coreutils)))
736 (inputs
737 `(("perl" ,perl)))
738 (propagated-inputs
739 `(("cdparanoia" ,cdparanoia)
740 ("flac" ,flac)
741 ("vorbis-tools" ,vorbis-tools)
742 ("wavpack" ,wavpack)
743 ("perl-cddb-get" ,perl-cddb-get)))
744 (home-page "http://www.suwald.com/ripit/about.php")
745 (synopsis "Command-line program to extract audio CDs")
746 (description "RipIT is used to extract audio from CDs.")
747 (license gpl2)))
748
749 (define-public ccd2cue
750 (package
751 (name "ccd2cue")
752 (version "0.5")
753 (source
754 (origin
755 (method url-fetch)
756 (uri (string-append
757 "mirror://gnu/ccd2cue/ccd2cue-" version
758 ".tar.gz"))
759 (sha256
760 (base32
761 "1icrkg25hwx4gsn3dski2172ia4ywjh8m1sa17zmjclnrgdwy9c7"))))
762 (build-system gnu-build-system)
763 (synopsis "CCD to CUE sheet conversion")
764 (description
765 "GNU ccd2cue is a preprocessor for CD burning software that allows
766 the conversion of the proprietary CCD format to the CUE format, which
767 is well-supported by free software. These files are commonly
768 distributed with CD images and are used to describe how tracks are
769 laid out on the image.")
770 (home-page "https://www.gnu.org/software/ccd2cue/")
771 (license gpl3+)))
772
773 (define-public libburn
774 (package
775 (name "libburn")
776 (version "1.5.0")
777 (source (origin
778 (method url-fetch)
779 (uri (string-append "http://files.libburnia-project.org/releases/"
780 "libburn-" version ".tar.gz"))
781 (sha256
782 (base32
783 "1gg2kgnqvaa2fwghai62prxz6slpak1f6bvgjh8m4dn16v114asq"))))
784 (build-system gnu-build-system)
785 (native-inputs
786 `(("pkg-config" ,pkg-config)))
787 (home-page "https://dev.lovelyhq.com/libburnia/libburn")
788 (synopsis "Library for reading and writing optical discs")
789 (description
790 "Libburn is a library for reading and writing optical discs.
791 Supported media are: CD-R, CD-RW, DVD-RAM, DVD+RW, DVD+R, DVD+R/DL,
792 DVD-RW, DVD-R, DVD-R/DL, BD-R, and BD-RE.")
793 (license gpl2)))
794
795 (define-public libisofs
796 (package
797 (name "libisofs")
798 (version "1.5.0")
799 (source (origin
800 (method url-fetch)
801 (uri (string-append "http://files.libburnia-project.org/releases/"
802 "libisofs-" version ".tar.gz"))
803 (sha256
804 (base32
805 "001l3akf3wb6msl9man776w560iqyvsbwwzs7d7y7msx13irspys"))))
806 (build-system gnu-build-system)
807 (inputs
808 `(("zlib" ,zlib)
809 ("acl" ,acl)))
810 (native-inputs
811 `(("pkg-config" ,pkg-config)))
812 (home-page "https://dev.lovelyhq.com/libburnia/libisofs")
813 (synopsis "Library to create ISO 9660 images")
814 (description
815 "Libisofs creates ISO 9660 (also known as ECMA-119) file system images
816 which can either be written to POSIX file objects or handed over to
817 libburn for being written directly to optical media.
818 It can read metadata of ISO 9660 filesystems, manipulate them, and use them
819 to produce new complete file system images or add-on images to be appended
820 to the read file system image.
821 Supported extensions to ISO 9660 are Rock Ridge, Joliet, AAIP, zisofs.")
822 (license gpl2+)))
823
824 (define-public cdrkit-libre
825 (package
826 (name "cdrkit-libre")
827 (version "1.1.11")
828 (source (origin
829 (method url-fetch)
830 ;; cdrkit.org is dead.
831 ;;
832 ;; ‘cdrkit-libre’ removes a couple of problematic files,
833 ;; see <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32165#14>.
834 (uri (string-append
835 "https://repo.parabola.nu/other/cdrkit-libre/cdrkit-libre-"
836 version ".tar.gz"))
837 (sha256
838 (base32
839 "0g2zyzb56czh429qy87lvaddzjnlcq8c616ddxsmsshz3clhyzrh"))))
840 (build-system cmake-build-system)
841 (inputs
842 `(("bzip2" ,bzip2)
843 ("libcap" ,libcap)
844 ("perl" ,perl)
845 ("zlib" ,zlib)))
846 (arguments
847 `(#:tests? #f ;no tests
848 #:phases
849 (modify-phases %standard-phases
850 (add-after 'install 'old-cdrecord
851 (lambda* (#:key outputs #:allow-other-keys)
852 (with-directory-excursion (string-append (assoc-ref outputs "out")
853 "/bin")
854 (symlink "genisoimage" "mkisofs")
855 (symlink "wodim" "cdrecord"))
856 #t)))))
857 (home-page "https://repo.parabola.nu/other/cdrkit-libre/")
858 (synopsis "Command-line CD/DVD recorder")
859 (description "Cdrkit is a suite of programs for recording CDs and DVDs,
860 blanking CD-RW media, creating ISO-9660 file system images, extracting audio
861 CD data, and more. It's mostly compatible with @code{cdrtools}.")
862 (license gpl2+)))