1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 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 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>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages cdrom)
30 #:use-module (guix download)
31 #:use-module (guix packages)
32 #:use-module ((guix licenses) #:select (lgpl2.1+ gpl2 gpl2+ gpl3+ cddl1.0))
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system glib-or-gtk)
36 #:use-module (guix gexp)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages acl)
39 #:use-module (gnu packages audio)
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages flex)
43 #:use-module (gnu packages fontutils)
44 #:use-module (gnu packages gettext)
45 #:use-module (gnu packages docbook)
46 #:use-module (gnu packages xml)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages man)
50 #:use-module (gnu packages m4)
51 #:use-module (gnu packages mp3)
52 #:use-module (gnu packages ncurses)
53 #:use-module (gnu packages elf)
54 #:use-module (gnu packages wxwidgets)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages readline)
58 #:use-module (gnu packages base)
59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages python)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages photo)
63 #:use-module (gnu packages video)
64 #:use-module (gnu packages wget)
65 #:use-module (gnu packages xiph))
67 (define-public libcddb
73 (uri (string-append "mirror://sourceforge/libcddb/libcddb/" version
74 "/libcddb-" version ".tar.bz2"))
77 "0fr21a7vprdyy1bq6s99m0x420c9jm5fipsd63pqv8qyfkhhxkim"))))
78 (build-system gnu-build-system)
79 (arguments '(#:tests? #f)) ; tests rely on access to external servers
80 (home-page "http://libcddb.sourceforge.net/")
81 (synopsis "C library to access data on a CDDB server")
83 "Libcddb is a C library to access data on a CDDB server (freedb.org). It
86 1. search the database for possible CD matches;
88 2. retrieve detailed information about a specific CD;
90 3. submit new CD entries to the database.
92 Libcddb supports both the custom CDDB protocol and tunnelling the query and
93 read operations over plain HTTP. It is also possible to use an HTTP proxy
94 server. If you want to speed things up, you can make use of the built-in
95 caching facility provided by the library.")
98 (define-public libcdio
104 (uri (string-append "mirror://gnu/libcdio/libcdio-"
108 "0jr8ppdm80c533nzmrpz3iffnpc6nhvsria1di9f4jg1l19a03fd"))))
109 (build-system gnu-build-system)
111 `(("ncurses" ,ncurses)
112 ("libcddb" ,libcddb)))
114 `(("help2man" ,help2man)
115 ("pkg-config" ,pkg-config)))
116 (home-page "https://www.gnu.org/software/libcdio/")
117 (synopsis "CD Input and Control library")
119 "The GNU Compact Disc Input and Control Library (libcdio) is a library
120 for CD-ROM and CD image file access. It allows the developer to add CD
121 access to an application without having to worry about the OS- and
122 device-dependent properties of CD-ROM or the specific details of CD image
123 formats. It includes pycdio, a Python interface to libcdio, and
124 libcdio-paranoia, a library providing jitter-free and error-free audio
125 extraction from CDs.")
128 (define-public libcdio-paranoia
130 (name "libcdio-paranoia")
131 (version "10.2+0.94+2")
134 (uri (string-append "mirror://gnu/libcdio/libcdio-paranoia-"
138 "0h8rr1ir05r29rgawa1ccw335668k4s3zq4yg9095svyx7n843yn"))))
139 (build-system gnu-build-system)
140 (native-inputs `(("pkg-config" ,pkg-config)))
141 (propagated-inputs `(("libcdio" ,libcdio)))
142 (home-page "https://www.gnu.org/software/libcdio/")
143 (synopsis "Jitter- and error-tolerant CD audio extraction")
145 "libcdio-paranoia is an implementation of CD paranoia libraries based on
149 (define-public xorriso
155 (uri (string-append "mirror://gnu/xorriso/xorriso-"
159 "10c44yr3dpmwxa7rf23mwfsy1bahny3jpcg9ig0xjv090jg0d0pc"))))
160 (build-system gnu-build-system)
163 ("readline" ,readline)
165 (home-page "https://www.gnu.org/software/xorriso/")
166 (synopsis "Create, manipulate, burn ISO-9660 file systems")
168 "GNU Xorriso is a tool for copying files to and from ISO 9660 Rock
169 Ridge, a.k.a. Compact Disc File System, file systems and it allows
170 session-wise manipulation of them. It features a formatter and burner for
171 CD, DVD and BD. It can operate on existing ISO images or it can create new
172 ones. xorriso can then be used to copy files directly into or out of ISO
176 (define-public cdparanoia
182 (uri (string-append "http://downloads.xiph.org/releases/"
183 "cdparanoia/cdparanoia-III-"
187 "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80"))
188 (patches (search-patches "cdparanoia-fpic.patch"))
189 (modules '((guix build utils)))
192 ;; Make libraries respect LDFLAGS.
193 (substitute* '("paranoia/Makefile.in" "interface/Makefile.in")
194 (("-Wl,-soname") "$(LDFLAGS) -Wl,-soname"))
196 (build-system gnu-build-system)
198 `(#:tests? #f ; there is no check target
199 #:configure-flags ; Add $libdir to the RUNPATH of all the executables.
200 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
201 (home-page "http://www.xiph.org/paranoia/")
202 (synopsis "Audio CD reading utility")
203 (description "Cdparanoia retrieves audio tracks from CDDA capable CDROM
204 drives. The data can be saved to a file or directed to standard output
205 in WAV, AIFF, AIFF-C or raw format. Most ATAPI, SCSI and several
206 proprietary CDROM drive makes are supported; cdparanoia can determine if the
207 target drive is CDDA capable. In addition to simple reading, cdparanoia adds
208 extra-robust data verification, synchronization, error handling and scratch
209 reconstruction capability.")
210 (license gpl2))) ; libraries under lgpl2.1
212 (define-public cdrtools
219 "mirror://sourceforge/cdrtools/cdrtools-" version ".tar.bz2"))
222 "03w6ypsmwwy4d7vh6zgwpc60v541vc5ywp8bdb758hbc4yv2wa7d"))
223 (patches (search-patches "cdrtools-3.01-mkisofs-isoinfo.patch"))))
224 (build-system gnu-build-system)
225 ;; XXX cdrtools bundles a modified, relicensed early version of cdparanoia.
227 `(("linux-headers" ,linux-libre-headers)))
230 (modify-phases %standard-phases
232 (add-before 'build 'set-linux-headers
234 (substitute* "autoconf/configure"
236 (assoc-ref %build-inputs "linux-headers")))
238 (add-before 'build 'substitute-dirs
240 (substitute* (append (find-files "DEFAULTS" "^Defaults\\.")
241 (find-files "DEFAULTS_ENG" "^Defaults\\.")
242 (find-files "TEMPLATES" "^Defaults\\."))
243 (("/opt/schily") (assoc-ref %outputs "out")))
248 (system* "make" "CONFIG_SHELL=sh" "CCOM=gcc" "RM=rm"))))
253 "RM=rm" "LN=ln" "SYMLINK=ln -s"
254 (string-append "INS_BASE=" (assoc-ref %outputs "out"))
255 (string-append "INS_RBASE=" (assoc-ref %outputs "out"))
257 #:tests? #f)) ; no tests
258 (synopsis "Command line utilities to manipulate and burn CD/DVD/BD images")
259 (description "cdrtools is a collection of command line utilities to create
260 CD's, DVD's or Blue Ray discs. The most important components are
261 @command{cdrecord}, a burning program, @command{cdda2wav}, a CD audio ripper
262 which uses libparanoia, and @command{mkisofs}, which can create various disc
264 (home-page "http://cdrtools.sourceforge.net/private/cdrecord.html")
266 ;; mkisofs is GPL, the other programs are CDDL.
267 (license (list cddl1.0 gpl2))))
269 (define-public dvd+rw-tools
271 (name "dvd+rw-tools")
276 "http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-"
280 "1jkjvvnjcyxpql97xjjx0kwvy70kxpiznr2zpjy2hhci5s10zmpq"))
281 (patches (search-patches "dvd+rw-tools-add-include.patch"))))
282 (build-system gnu-build-system)
284 `(("cdrtools" ,cdrtools)))
288 `(#:tests? #f ; No tests.
290 (modify-phases %standard-phases
292 (lambda _ (setenv "prefix" (assoc-ref %outputs "out")) #t))
293 (add-before 'build 'embed-mkisofs
294 (lambda* (#:key inputs #:allow-other-keys)
295 ;; We use sed --in-place because substitute* cannot handle the
296 ;; character encoding used by growisofs.c.
297 (zero? (system* "sed" "-i" "-e"
300 "\"" (which "mkisofs") "\",")
302 (home-page "http://fy.chalmers.se/~appro/linux/DVD+RW/")
303 (synopsis "DVD and Blu-ray Disc burning tools")
304 (description "dvd+rw-tools, mostly known for its command
305 @command{growisofs}, is a collection of DVD and Blu-ray Disc burning tools.
306 It requires another program, such as @command{mkisofs}, @command{genisoimage},
307 or @command{xorrisofs} to create ISO 9660 images.")
310 (define-public dvdisaster
316 (uri (string-append "http://dvdisaster.net/downloads/dvdisaster-"
320 "0f8gjnia2fxcbmhl8b3qkr5b7idl8m855dw7xw2fnmbqwvcm6k4w"))))
321 (build-system gnu-build-system)
325 `(("gettext" ,gettext-minimal)
326 ("pkg-config" ,pkg-config)
329 `(;; Parallel builds appear to be unsafe, see
330 ;; <http://hydra.gnu.org/build/49331/nixlog/1/raw>.
332 #:tests? #f)) ; no check target
333 (home-page "http://dvdisaster.net/en/index.html")
334 (synopsis "Error correcting codes for optical media images")
335 (description "Optical media (CD,DVD,BD) keep their data only for a
336 finite time (typically for many years). After that time, data loss develops
337 slowly with read errors growing from the outer media region towards the
340 Dvdisaster stores data on CD/DVD/BD (supported media) in a way that it is
341 fully recoverable even after some read errors have developed. This enables
342 you to rescue the complete data to a new medium.
344 Data loss is prevented by using error correcting codes. Error correction
345 data is either added to the medium or kept in separate error correction
346 files. Dvdisaster works at the image level so that the recovery does not
347 depend on the file system of the medium. The maximum error correction
348 capacity is user-selectable.")
351 (define-public dvdstyler
358 (uri (string-append "mirror://sourceforge/dvdstyler/dvdstyler/"
359 version "/DVDStyler-" version ".tar.bz2"))
362 "0lwc0hn94m9r8fi07sjqz3fr618l6lnw3zsakxw7nlgnxbjsk7pi"))))
363 (build-system gnu-build-system)
366 (list (string-append "XMLTO="
367 (assoc-ref %build-inputs "xmlto")
368 "/bin/xmlto --searchpath "
369 (assoc-ref %build-inputs "docbook-xsl")
370 "/xml/xsl/docbook-xsl-" ,(package-version docbook-xsl)
372 (assoc-ref %build-inputs "docbook-xml")
375 (modify-phases %standard-phases
376 (add-after 'install 'wrap-program
377 (lambda* (#:key inputs outputs #:allow-other-keys)
378 (wrap-program (string-append (assoc-ref outputs "out") "/bin/dvdstyler")
381 (map (lambda (in) (string-append (assoc-ref inputs in) "/bin"))
382 '("cdrtools" "dvdauthor" "dvd+rw-tools" "ffmpeg"))
385 #:tests? #f)) ; No tests.
386 (inputs ; TODO package bundled wxvillalib
387 `(("wxwidgets" ,wxwidgets-3.1)
390 ("cdrtools" ,cdrtools)
391 ("dvd+rw-tools" ,dvd+rw-tools)
392 ("dvdauthor" ,dvdauthor)
394 ("fontconfig" ,fontconfig)
399 `(("pkg-config" ,pkg-config)
403 ("gettext" ,gnu-gettext)
404 ("docbook-xml" ,docbook-xml)
405 ("docbook-xsl" ,docbook-xsl)
407 (synopsis "DVD authoring application")
408 (description "DVDStyler is a DVD authoring application which allows users
409 to burn video files in many formats to DVD discs, complete with individually
410 designed menus. It can be used to create professional-looking DVD's with
411 custom buttons, backgrounds and animations, from within a user-friendly
412 graphical interface.")
413 (home-page "https://www.dvdstyler.org")
416 (define-public libcue
423 "https://github.com/lipnitsk/libcue/archive/v"
425 (file-name (string-append name "-" version ".tar.gz"))
428 "0y9808vbly1w6i3diaad9csjmmw6iaw572wjjr68ssqamsw193rj"))))
429 (build-system cmake-build-system)
433 (home-page "https://github.com/lipnitsk/libcue")
434 (synopsis "C library to parse cue sheets")
435 (description "Libcue is a C library to parse so-called @dfn{cue sheets}
436 which contain meta-data for CD/DVD tracks. It provides an API to manipulate
440 (define-public cd-discid
444 (home-page "http://linukz.org/cd-discid.shtml")
447 (uri (string-append "http://linukz.org/download/cd-discid-"
451 "0qrcvn7227qaayjcd5rm7z0k5q89qfy5qkdgwr5pd7ih0va8rmpz"))
452 (modules '((guix build utils)))
455 (substitute* "Makefile"
456 (("/usr/bin/install")
459 (build-system gnu-build-system)
462 #:phases (modify-phases %standard-phases (delete 'configure))
463 #:make-flags (list "CC=gcc"
464 (string-append "PREFIX="
465 (assoc-ref %outputs "out")))))
466 (synopsis "Get CDDB discid information from an audio CD")
468 "cd-discid is a command-line tool to retrieve CDDB discid information
476 (home-page "https://abcde.einval.com/")
479 (uri (string-append home-page "/download/abcde-"
483 "0f9bjs0phk23vry7gvh0cll9vl6kmc1y4fwwh762scfdvpbp3774"))
484 (modules '((guix build utils)))
487 (substitute* "Makefile"
488 (("/usr/bin/install")
491 (string-append "etcdir = $(prefix)/etc\n")))
493 (build-system gnu-build-system)
496 (modify-phases %standard-phases
498 (lambda* (#:key outputs inputs #:allow-other-keys)
499 (substitute* "Makefile"
501 (string-append "prefix = "
502 (assoc-ref outputs "out")
504 (("^sysconfdir = .*$")
505 (string-append "sysconfdir = "
506 (assoc-ref outputs "out")
509 (add-after 'install 'wrap
510 (lambda* (#:key inputs outputs #:allow-other-keys)
511 (let ((wget (assoc-ref inputs "wget"))
512 (vorbis (assoc-ref inputs "vorbis-tools"))
513 (parano (assoc-ref inputs "cdparanoia"))
514 (which (assoc-ref inputs "which"))
515 (discid (assoc-ref inputs "cd-discid"))
516 (flac (assoc-ref inputs "flac"))
517 (out (assoc-ref outputs "out")))
521 (,(string-append out "/bin:"
530 (find-files (string-append out "/bin")
532 #:tests? #f)) ; no test target
534 (inputs `(("wget" ,wget)
536 ("cdparanoia" ,cdparanoia)
537 ("cd-discid" ,cd-discid)
538 ("vorbis-tools" ,vorbis-tools)
541 ;; A couple of Python and Perl scripts are included.
545 (synopsis "Command-line audio CD ripper")
547 "abcde is a front-end command-line utility (actually, a shell script)
548 that grabs tracks off a CD, encodes them to Ogg/Vorbis, MP3, FLAC, Ogg/Speex
549 and/or MPP/MP+ (Musepack) format, and tags them, all in one go.")
552 (define-public geteltorito
557 "https://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/")
560 (uri (string-append home-page name "-" version ".tar.gz"))
563 "1gkbm9ahj2mgqrkrfpibzclsriqgsbsvjh19fr815vpd9f6snkxv"))))
564 (build-system gnu-build-system)
566 `(#:tests? #f ; No tests.
568 (modify-phases %standard-phases
572 (lambda* (#:key outputs #:allow-other-keys)
573 (let ((out (assoc-ref outputs "out")))
574 (install-file "geteltorito"
575 (string-append out "/bin"))))))))
576 (inputs `(("perl" ,perl)))
577 (synopsis "Extract the boot image from a CD-ROM")
579 "@command{geteltorito} can extract the initial/default boot
580 image from CDs (and ISOs) that follow the El Torito specification
581 for bootable CD-ROMs.
583 Image data is written to standard output by default and all other
584 information is written to standard error.")
587 (define-public asunder
594 (string-append "http://www.littlesvr.ca/asunder/releases/asunder-"
599 "1nq9kd4rd4k2kibf57gdbm0zw2gxa234vvvdhxkm8g5bhx5h3iyq"))))
600 (build-system glib-or-gtk-build-system)
602 '(#:out-of-source? #f
603 #:phases (modify-phases %standard-phases
604 (add-after 'install 'wrap
605 (lambda* (#:key inputs outputs #:allow-other-keys)
606 (let ((program (string-append (assoc-ref outputs "out")
608 (define (bin-directory input-name)
609 (string-append (assoc-ref inputs input-name) "/bin"))
610 (wrap-program program
612 ,(map bin-directory (list "cdparanoia"
618 (native-inputs `(("intltool" ,intltool)
619 ("pkg-config" ,pkg-config)))
620 ;; TODO: Add the necessary packages for Musepack encoding.
621 (inputs `(("gtk+-2" ,gtk+-2)
624 ("cdparanoia" ,cdparanoia)
626 ("vorbis-tools" ,vorbis-tools)
628 ("opus-tools" ,opus-tools)
629 ("wavpack" ,wavpack)))
630 (home-page "http://www.littlesvr.ca/asunder/")
631 (synopsis "Graphical audio CD ripper and encoder")
633 "Asunder is a graphical audio CD ripper and encoder. It can save audio
634 tracks as WAV, MP3, Ogg Vorbis, FLAC, Opus, Wavpack, and Musepack. It can use
635 CDDB to name and tag each track automatically, and it allows for each track to
636 be by a different artist. Asunder can encode to multiple formats in one
637 session, and it can create M3U playlists.")
646 (uri (string-append "http://www.suwald.com/ripit/ripit-"
650 "0ap71x477jy9c4jiqazb3y45hxdxm3jbq24x05g3vjyqzigi4x1b"))))
651 (build-system gnu-build-system)
653 `(#:tests? #f ; No test suite.
655 (modify-phases %standard-phases
657 (add-after 'unpack 'patch-usr-bin-install
658 (lambda* (#:key inputs outputs #:allow-other-keys)
659 (substitute* "Makefile"
660 (("/usr/bin/install") (string-append
661 (assoc-ref inputs "coreutils")
663 (("\\$\\(DESTDIR\\)/usr/local") (assoc-ref outputs "out"))
664 (("../../etc") "etc")))))))
666 `(("coreutils" ,coreutils)))
670 `(("cdparanoia" ,cdparanoia)
672 ("vorbis-tools" ,vorbis-tools)
674 ("perl-cddb-get" ,perl-cddb-get)))
675 (home-page "http://www.suwald.com/ripit/about.php")
676 (synopsis "Command-line program to extract audio CDs")
677 (description "RipIT is used to extract audio from CDs.")
680 (define-public ccd2cue
688 "mirror://gnu/ccd2cue/ccd2cue-" version
692 "1icrkg25hwx4gsn3dski2172ia4ywjh8m1sa17zmjclnrgdwy9c7"))))
693 (build-system gnu-build-system)
694 (synopsis "CCD to CUE sheet conversion")
696 "GNU ccd2cue is a preprocessor for CD burning software that allows
697 the conversion of the proprietary CCD format to the CUE format, which
698 is well-supported by free software. These files are commonly
699 distributed with CD images and are used to describe how tracks are
700 laid out on the image.")
701 (home-page "https://www.gnu.org/software/ccd2cue/")
704 (define-public libburn
710 (uri (string-append "http://files.libburnia-project.org/releases/"
711 "libburn-" version ".tar.gz"))
714 "0wbh49s3az3sfpai09z1zdgynq7wnwrk31v5589033274nmzldlx"))))
715 (build-system gnu-build-system)
717 `(("pkg-config" ,pkg-config)))
718 (home-page "https://dev.lovelyhq.com/libburnia/libburn")
719 (synopsis "Library for reading and writing optical discs")
721 "Libburn is a library for reading and writing optical discs.
722 Supported media are: CD-R, CD-RW, DVD-RAM, DVD+RW, DVD+R, DVD+R/DL,
723 DVD-RW, DVD-R, DVD-R/DL, BD-R, and BD-RE.")
726 (define-public libisofs
732 (uri (string-append "http://files.libburnia-project.org/releases/"
733 "libisofs-" version ".tar.gz"))
736 "02m5g6lbmmkh2xc5xzq5zaf3ma6v31gls66aj886b3cq9qw0paql"))))
737 (build-system gnu-build-system)
742 `(("pkg-config" ,pkg-config)))
743 (home-page "https://dev.lovelyhq.com/libburnia/libisofs")
744 (synopsis "Library to create ISO 9660 images")
746 "Libisofs creates ISO 9660 (also known as ECMA-119) filesystem images
747 which can either be written to POSIX file objects or handed over to
748 libburn for being written directly to optical media.
749 It can read metadata of ISO 9660 filesystems, manipulate them, and use them
750 to produce new complete filesystem images or add-on images to be appended
751 to the read filesystem image.
752 Supported extensions to ISO 9660 are Rock Ridge, Joliet, AAIP, zisofs.")