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>
12 ;;; This file is part of GNU Guix.
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.
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.
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/>.
27 (define-module (gnu packages cdrom)
28 #:use-module (guix download)
29 #:use-module (guix packages)
30 #:use-module ((guix licenses) #:select (lgpl2.1+ gpl2 gpl2+ gpl3+ cddl1.0))
31 #:use-module (guix build-system cmake)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system glib-or-gtk)
34 #:use-module (guix gexp)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages acl)
37 #:use-module (gnu packages audio)
38 #:use-module (gnu packages bison)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages fontutils)
42 #:use-module (gnu packages gettext)
43 #:use-module (gnu packages docbook)
44 #:use-module (gnu packages xml)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages man)
48 #:use-module (gnu packages m4)
49 #:use-module (gnu packages mp3)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages elf)
52 #:use-module (gnu packages wxwidgets)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages readline)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages photo)
61 #:use-module (gnu packages video)
62 #:use-module (gnu packages wget)
63 #:use-module (gnu packages xiph))
65 (define-public libcddb
71 (uri (string-append "mirror://sourceforge/libcddb/libcddb/" version
72 "/libcddb-" version ".tar.bz2"))
75 "0fr21a7vprdyy1bq6s99m0x420c9jm5fipsd63pqv8qyfkhhxkim"))))
76 (build-system gnu-build-system)
77 (arguments '(#:tests? #f)) ; tests rely on access to external servers
78 (home-page "http://libcddb.sourceforge.net/")
79 (synopsis "C library to access data on a CDDB server")
81 "Libcddb is a C library to access data on a CDDB server (freedb.org). It
84 1. search the database for possible CD matches;
86 2. retrieve detailed information about a specific CD;
88 3. submit new CD entries to the database.
90 Libcddb supports both the custom CDDB protocol and tunnelling the query and
91 read operations over plain HTTP. It is also possible to use an HTTP proxy
92 server. If you want to speed things up, you can make use of the built-in
93 caching facility provided by the library.")
96 (define-public libcdio
102 (uri (string-append "mirror://gnu/libcdio/libcdio-"
106 "0nh222bnj0hgdic5nvr8l9j194mh5niqy15rypwrdbk6z01wkqln"))))
107 (build-system gnu-build-system)
109 `(("ncurses" ,ncurses)
110 ("libcddb" ,libcddb)))
112 `(("help2man" ,help2man)
113 ("pkg-config" ,pkg-config)))
114 (home-page "https://www.gnu.org/software/libcdio/")
115 (synopsis "CD Input and Control library")
117 "The GNU Compact Disc Input and Control Library (libcdio) is a library
118 for CD-ROM and CD image file access. It allows the developer to add CD
119 access to an application without having to worry about the OS- and
120 device-dependent properties of CD-ROM or the specific details of CD image
121 formats. It includes pycdio, a Python interface to libcdio, and
122 libcdio-paranoia, a library providing jitter-free and error-free audio
123 extraction from CDs.")
126 (define-public libcdio-paranoia
128 (name "libcdio-paranoia")
129 (version "10.2+0.93+1")
132 (uri (string-append "mirror://gnu/libcdio/libcdio-paranoia-"
136 "14x4b4jk5b0zvcalrg02y4jmbkmmlb07qfmk5hph9k18b8frn7gc"))))
137 (build-system gnu-build-system)
138 (native-inputs `(("pkg-config" ,pkg-config)))
139 (propagated-inputs `(("libcdio" ,libcdio)))
140 (home-page "https://www.gnu.org/software/libcdio/")
141 (synopsis "Jitter- and error-tolerant CD audio extraction")
143 "libcdio-paranoia is an implementation of CD paranoia libraries based on
147 (define-public xorriso
153 (uri (string-append "mirror://gnu/xorriso/xorriso-"
157 "10c44yr3dpmwxa7rf23mwfsy1bahny3jpcg9ig0xjv090jg0d0pc"))))
158 (build-system gnu-build-system)
161 ("readline" ,readline)
164 ("libcdio" ,libcdio)))
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)))
191 ;; Make libraries respect LDFLAGS.
192 '(substitute* '("paranoia/Makefile.in" "interface/Makefile.in")
193 (("-Wl,-soname") "$(LDFLAGS) -Wl,-soname")))))
194 (build-system gnu-build-system)
196 `(#:tests? #f ; there is no check target
197 #:configure-flags ; Add $libdir to the RUNPATH of all the executables.
198 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
199 (home-page "http://www.xiph.org/paranoia/")
200 (synopsis "Audio CD reading utility")
201 (description "Cdparanoia retrieves audio tracks from CDDA capable CDROM
202 drives. The data can be saved to a file or directed to standard output
203 in WAV, AIFF, AIFF-C or raw format. Most ATAPI, SCSI and several
204 proprietary CDROM drive makes are supported; cdparanoia can determine if the
205 target drive is CDDA capable. In addition to simple reading, cdparanoia adds
206 extra-robust data verification, synchronization, error handling and scratch
207 reconstruction capability.")
208 (license gpl2))) ; libraries under lgpl2.1
210 (define-public cdrtools
217 "mirror://sourceforge/cdrtools/cdrtools-" version ".tar.bz2"))
220 "03w6ypsmwwy4d7vh6zgwpc60v541vc5ywp8bdb758hbc4yv2wa7d"))
221 (patches (search-patches "cdrtools-3.01-mkisofs-isoinfo.patch"))))
222 (build-system gnu-build-system)
223 ;; XXX cdrtools bundles a modified, relicensed early version of cdparanoia.
225 `(("linux-headers" ,linux-libre-headers)))
228 (modify-phases %standard-phases
230 (add-before 'build 'set-linux-headers
232 (substitute* "autoconf/configure"
234 (assoc-ref %build-inputs "linux-headers")))
236 (add-before 'build 'substitute-dirs
238 (substitute* (append (find-files "DEFAULTS" "^Defaults\\.")
239 (find-files "DEFAULTS_ENG" "^Defaults\\.")
240 (find-files "TEMPLATES" "^Defaults\\."))
241 (("/opt/schily") (assoc-ref %outputs "out")))
246 (system* "make" "CONFIG_SHELL=sh" "CCOM=gcc" "RM=rm"))))
251 "RM=rm" "LN=ln" "SYMLINK=ln -s"
252 (string-append "INS_BASE=" (assoc-ref %outputs "out"))
253 (string-append "INS_RBASE=" (assoc-ref %outputs "out"))
255 #:tests? #f)) ; no tests
256 (synopsis "Command line utilities to manipulate and burn CD/DVD/BD images")
257 (description "cdrtools is a collection of command line utilities to create
258 CD's, DVD's or Blue Ray discs. The most important components are
259 @command{cdrecord}, a burning program, @command{cdda2wav}, a CD audio ripper
260 which uses libparanoia, and @command{mkisofs}, which can create various disc
262 (home-page "http://cdrtools.sourceforge.net/private/cdrecord.html")
264 ;; mkisofs is GPL, the other programs are CDDL.
265 (license (list cddl1.0 gpl2))))
267 (define-public dvd+rw-tools
269 (name "dvd+rw-tools")
274 "http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-"
278 "1jkjvvnjcyxpql97xjjx0kwvy70kxpiznr2zpjy2hhci5s10zmpq"))
279 (patches (search-patches "dvd+rw-tools-add-include.patch"))))
280 (build-system gnu-build-system)
282 `(("cdrtools" ,cdrtools)))
286 `(#:tests? #f ; No tests.
288 (modify-phases %standard-phases
290 (lambda _ (setenv "prefix" (assoc-ref %outputs "out")) #t))
291 (add-before 'build 'embed-mkisofs
292 (lambda* (#:key inputs #:allow-other-keys)
293 ;; We use sed --in-place because substitute* cannot handle the
294 ;; character encoding used by growisofs.c.
295 (zero? (system* "sed" "-i" "-e"
298 "\"" (which "mkisofs") "\",")
300 (home-page "http://fy.chalmers.se/~appro/linux/DVD+RW/")
301 (synopsis "DVD and Blu-ray Disc burning tools")
302 (description "dvd+rw-tools, mostly known for its command
303 @command{growisofs}, is a collection of DVD and Blu-ray Disc burning tools.
304 It requires another program, such as @command{mkisofs}, @command{genisoimage},
305 or @command{xorrisofs} to create ISO 9660 images.")
308 (define-public dvdisaster
314 (uri (string-append "http://dvdisaster.net/downloads/dvdisaster-"
318 "0f8gjnia2fxcbmhl8b3qkr5b7idl8m855dw7xw2fnmbqwvcm6k4w"))))
319 (build-system gnu-build-system)
323 `(("gettext" ,gettext-minimal)
324 ("pkg-config" ,pkg-config)
327 `(;; Parallel builds appear to be unsafe, see
328 ;; <http://hydra.gnu.org/build/49331/nixlog/1/raw>.
330 #:tests? #f)) ; no check target
331 (home-page "http://dvdisaster.net/en/index.html")
332 (synopsis "Error correcting codes for optical media images")
333 (description "Optical media (CD,DVD,BD) keep their data only for a
334 finite time (typically for many years). After that time, data loss develops
335 slowly with read errors growing from the outer media region towards the
338 Dvdisaster stores data on CD/DVD/BD (supported media) in a way that it is
339 fully recoverable even after some read errors have developed. This enables
340 you to rescue the complete data to a new medium.
342 Data loss is prevented by using error correcting codes. Error correction
343 data is either added to the medium or kept in separate error correction
344 files. Dvdisaster works at the image level so that the recovery does not
345 depend on the file system of the medium. The maximum error correction
346 capacity is user-selectable.")
349 (define-public dvdstyler
356 (uri (string-append "mirror://sourceforge/dvdstyler/dvdstyler/"
357 version "/DVDStyler-" version ".tar.bz2"))
360 "1j432kszmwmsd3nz398h5514dbm5vsrn4rr3iil72ckjj1h3i00q"))))
361 (build-system gnu-build-system)
363 `(#:configure-flags (list (string-append "XMLTO="
364 (assoc-ref %build-inputs "xmlto")
367 (assoc-ref %build-inputs "docbook-xsl")
368 "/xml/xsl/docbook-xsl-1.79.1/htmlhelp:"
369 (assoc-ref %build-inputs "docbook-xml")
372 (modify-phases %standard-phases
373 (add-after 'install 'wrap-program
374 (lambda* (#:key inputs outputs #:allow-other-keys)
375 (wrap-program (string-append (assoc-ref outputs "out") "/bin/dvdstyler")
378 (map (lambda (in) (string-append (assoc-ref inputs in) "/bin"))
379 '("cdrtools" "dvdauthor" "dvd+rw-tools" "ffmpeg"))
382 #:tests? #f)) ; No tests.
383 (inputs ; TODO package bundled wxvillalib
384 `(("wxwidgets" ,wxwidgets-3.1)
387 ("cdrtools" ,cdrtools)
388 ("dvd+rw-tools" ,dvd+rw-tools)
389 ("dvdauthor" ,dvdauthor)
391 ("fontconfig" ,fontconfig)
396 `(("pkg-config" ,pkg-config)
400 ("gettext" ,gnu-gettext)
401 ("docbook-xml" ,docbook-xml)
402 ("docbook-xsl" ,docbook-xsl)
404 (synopsis "DVD authoring application")
405 (description "DVDStyler is a DVD authoring application which allows users
406 to burn video files in many formats to DVD discs, complete with individually
407 designed menus. It can be used to create professional-looking DVD's with
408 custom buttons, backgrounds and animations, from within a user-friendly
409 graphical interface.")
410 (home-page "https://www.dvdstyler.org")
413 (define-public libcue
420 "https://github.com/lipnitsk/libcue/archive/v"
422 (file-name (string-append name "-" version ".tar.gz"))
425 "1fradl3dx0pyy9rn1a0gak9gzgg40wax61f2s00zks7rwl0xv398"))))
426 (build-system cmake-build-system)
430 (home-page "https://github.com/lipnitsk/libcue")
431 (synopsis "C library to parse cue sheets")
432 (description "Libcue is a C library to parse so-called @dfn{cue sheets}
433 which contain meta-data for CD/DVD tracks. It provides an API to manipulate
437 (define-public cd-discid
441 (home-page "http://linukz.org/cd-discid.shtml")
444 (uri (string-append "http://linukz.org/download/cd-discid-"
448 "0qrcvn7227qaayjcd5rm7z0k5q89qfy5qkdgwr5pd7ih0va8rmpz"))
449 (modules '((guix build utils)))
451 '(substitute* "Makefile"
452 (("/usr/bin/install")
454 (build-system gnu-build-system)
457 #:phases (alist-delete 'configure %standard-phases)
458 #:make-flags (list "CC=gcc"
459 (string-append "PREFIX="
460 (assoc-ref %outputs "out")))))
461 (synopsis "Get CDDB discid information from an audio CD")
463 "cd-discid is a command-line tool to retrieve CDDB discid information
471 (home-page "https://abcde.einval.com/")
474 (uri (string-append home-page "/download/abcde-"
478 "0f9bjs0phk23vry7gvh0cll9vl6kmc1y4fwwh762scfdvpbp3774"))
479 (modules '((guix build utils)))
481 '(substitute* "Makefile"
482 (("/usr/bin/install")
485 (string-append "etcdir = $(prefix)/etc\n"))))))
486 (build-system gnu-build-system)
489 (modify-phases %standard-phases
491 (lambda* (#:key outputs inputs #:allow-other-keys)
492 (substitute* "Makefile"
494 (string-append "prefix = "
495 (assoc-ref outputs "out")
497 (("^sysconfdir = .*$")
498 (string-append "sysconfdir = "
499 (assoc-ref outputs "out")
502 (add-after 'install 'wrap
503 (lambda* (#:key inputs outputs #:allow-other-keys)
504 (let ((wget (assoc-ref inputs "wget"))
505 (vorbis (assoc-ref inputs "vorbis-tools"))
506 (parano (assoc-ref inputs "cdparanoia"))
507 (which (assoc-ref inputs "which"))
508 (discid (assoc-ref inputs "cd-discid"))
509 (flac (assoc-ref inputs "flac"))
510 (out (assoc-ref outputs "out")))
514 (,(string-append out "/bin:"
523 (find-files (string-append out "/bin")
525 #:tests? #f)) ; no test target
527 (inputs `(("wget" ,wget)
529 ("cdparanoia" ,cdparanoia)
530 ("cd-discid" ,cd-discid)
531 ("vorbis-tools" ,vorbis-tools)
534 ;; A couple of Python and Perl scripts are included.
538 (synopsis "Command-line audio CD ripper")
540 "abcde is a front-end command-line utility (actually, a shell script)
541 that grabs tracks off a CD, encodes them to Ogg/Vorbis, MP3, FLAC, Ogg/Speex
542 and/or MPP/MP+ (Musepack) format, and tags them, all in one go.")
545 (define-public geteltorito
550 "https://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/")
553 (uri (string-append home-page name "-" version ".tar.gz"))
556 "1gkbm9ahj2mgqrkrfpibzclsriqgsbsvjh19fr815vpd9f6snkxv"))))
557 (build-system gnu-build-system)
559 `(#:tests? #f ; No tests.
561 (modify-phases %standard-phases
565 (lambda* (#:key outputs #:allow-other-keys)
566 (let ((out (assoc-ref outputs "out")))
567 (install-file "geteltorito"
568 (string-append out "/bin"))))))))
569 (inputs `(("perl" ,perl)))
570 (synopsis "Extract the boot image from a CD-ROM")
572 "@command{geteltorito} can extract the initial/default boot
573 image from CDs (and ISOs) that follow the El Torito specification
574 for bootable CD-ROMs.
576 Image data is written to standard output by default and all other
577 information is written to standard error.")
580 (define-public asunder
587 (string-append "http://www.littlesvr.ca/asunder/releases/asunder-"
592 "1nq9kd4rd4k2kibf57gdbm0zw2gxa234vvvdhxkm8g5bhx5h3iyq"))))
593 (build-system glib-or-gtk-build-system)
595 '(#:out-of-source? #f
596 #:phases (modify-phases %standard-phases
597 (add-after 'install 'wrap
598 (lambda* (#:key inputs outputs #:allow-other-keys)
599 (let ((program (string-append (assoc-ref outputs "out")
601 (define (bin-directory input-name)
602 (string-append (assoc-ref inputs input-name) "/bin"))
603 (wrap-program program
605 ,(map bin-directory (list "cdparanoia"
611 (native-inputs `(("intltool" ,intltool)
612 ("pkg-config" ,pkg-config)))
613 ;; TODO: Add the necessary packages for Musepack encoding.
614 (inputs `(("gtk+-2" ,gtk+-2)
617 ("cdparanoia" ,cdparanoia)
619 ("vorbis-tools" ,vorbis-tools)
621 ("opus-tools" ,opus-tools)
622 ("wavpack" ,wavpack)))
623 (home-page "http://www.littlesvr.ca/asunder/")
624 (synopsis "Graphical audio CD ripper and encoder")
626 "Asunder is a graphical audio CD ripper and encoder. It can save audio
627 tracks as WAV, MP3, Ogg Vorbis, FLAC, Opus, Wavpack, and Musepack. It can use
628 CDDB to name and tag each track automatically, and it allows for each track to
629 be by a different artist. Asunder can encode to multiple formats in one
630 session, and it can create M3U playlists.")
639 (uri (string-append "http://www.suwald.com/ripit/ripit-"
643 "0ap71x477jy9c4jiqazb3y45hxdxm3jbq24x05g3vjyqzigi4x1b"))))
644 (build-system gnu-build-system)
646 `(#:tests? #f ; No test suite.
648 (modify-phases %standard-phases
650 (add-after 'unpack 'patch-usr-bin-install
651 (lambda* (#:key inputs outputs #:allow-other-keys)
652 (substitute* "Makefile"
653 (("/usr/bin/install") (string-append
654 (assoc-ref inputs "coreutils")
656 (("\\$\\(DESTDIR\\)/usr/local") (assoc-ref outputs "out"))
657 (("../../etc") "etc")))))))
659 `(("coreutils" ,coreutils)))
663 `(("cdparanoia" ,cdparanoia)
665 ("vorbis-tools" ,vorbis-tools)
667 ("perl-cddb-get" ,perl-cddb-get)))
668 (home-page "http://www.suwald.com/ripit/about.php")
669 (synopsis "Command-line program to extract audio CDs")
670 (description "RipIT is used to extract audio from CDs.")
673 (define-public ccd2cue
681 "mirror://gnu/ccd2cue/ccd2cue-" version
685 "1icrkg25hwx4gsn3dski2172ia4ywjh8m1sa17zmjclnrgdwy9c7"))))
686 (build-system gnu-build-system)
687 (synopsis "CCD to CUE sheet conversion")
689 "GNU ccd2cue is a preprocessor for CD burning software that allows
690 the conversion of the proprietary CCD format to the CUE format, which
691 is well-supported by free software. These files are commonly
692 distributed with CD images and are used to describe how tracks are
693 laid out on the image.")
694 (home-page "https://www.gnu.org/software/ccd2cue/")