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 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages cdrom)
25 #:use-module (guix download)
26 #:use-module (guix packages)
27 #:use-module ((guix licenses) #:select (lgpl2.1+ gpl2 gpl2+ gpl3+))
28 #:use-module (guix build-system cmake)
29 #:use-module (guix build-system gnu)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages acl)
32 #:use-module (gnu packages bison)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages flex)
35 #:use-module (gnu packages gettext)
36 #:use-module (gnu packages gtk)
37 #:use-module (gnu packages man)
38 #:use-module (gnu packages ncurses)
39 #:use-module (gnu packages elf)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages readline)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages perl)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages wget)
46 #:use-module (gnu packages xiph))
48 (define-public libcddb
54 (uri (string-append "mirror://sourceforge/libcddb/libcddb/" version
55 "/libcddb-" version ".tar.bz2"))
58 "0fr21a7vprdyy1bq6s99m0x420c9jm5fipsd63pqv8qyfkhhxkim"))))
59 (build-system gnu-build-system)
60 (arguments '(#:tests? #f)) ; tests rely on access to external servers
61 (home-page "http://libcddb.sourceforge.net/")
62 (synopsis "C library to access data on a CDDB server")
64 "Libcddb is a C library to access data on a CDDB server (freedb.org). It
67 1. search the database for possible CD matches;
69 2. retrieve detailed information about a specific CD;
71 3. submit new CD entries to the database.
73 Libcddb supports both the custom CDDB protocol and tunnelling the query and
74 read operations over plain HTTP. It is also possible to use an HTTP proxy
75 server. If you want to speed things up, you can make use of the built-in
76 caching facility provided by the library.")
79 (define-public libcdio
85 (uri (string-append "mirror://gnu/libcdio/libcdio-"
89 "0xb9km1750ndr7nglgbv1smv03dy8nkcfd9djbzqn3ldzlicswj9"))))
90 (build-system gnu-build-system)
92 `(("ncurses" ,ncurses)
93 ("libcddb" ,libcddb)))
95 `(("help2man" ,help2man)
96 ("pkg-config" ,pkg-config)))
97 (home-page "http://www.gnu.org/software/libcdio/")
98 (synopsis "CD Input and Control library")
100 "The GNU Compact Disc Input and Control Library (libcdio) is a library
101 for CD-ROM and CD image file access. It allows the developer to add CD
102 access to an application without having to worry about the OS- and
103 device-dependent properties of CD-ROM or the specific details of CD image
104 formats. It includes pycdio, a Python interface to libcdio, and
105 libcdio-paranoia, a library providing jitter-free and error-free audio
106 extraction from CDs.")
109 (define-public libcdio-paranoia
111 (name "libcdio-paranoia")
112 (version "10.2+0.93+1")
115 (uri (string-append "mirror://gnu/libcdio/libcdio-paranoia-"
119 "14x4b4jk5b0zvcalrg02y4jmbkmmlb07qfmk5hph9k18b8frn7gc"))))
120 (build-system gnu-build-system)
121 (native-inputs `(("pkg-config" ,pkg-config)))
122 (propagated-inputs `(("libcdio" ,libcdio)))
123 (home-page "http://www.gnu.org/software/libcdio/")
124 (synopsis "Jitter- and error-tolerant CD audio extraction")
126 "libcdio-paranoia is an implementation of CD paranoia libraries based on
130 (define-public xorriso
136 (uri (string-append "mirror://gnu/xorriso/xorriso-"
140 "112p0ghwzxrcjbsir1n2jxhq103ckrw93wzvd55qqvzfgs674vsj"))))
141 (build-system gnu-build-system)
144 ("readline" ,readline)
147 ("libcdio" ,libcdio)))
148 (home-page "https://www.gnu.org/software/xorriso/")
149 (synopsis "Create, manipulate, burn ISO-9660 file systems")
151 "GNU Xorriso is a tool for copying files to and from ISO 9660 Rock
152 Ridge, a.k.a. Compact Disc File System, file systems and it allows
153 session-wise manipulation of them. It features a formatter and burner for
154 CD, DVD and BD. It can operate on existing ISO images or it can create new
155 ones. xorriso can then be used to copy files directly into or out of ISO
159 (define-public cdparanoia
165 (uri (string-append "http://downloads.xiph.org/releases/"
166 "cdparanoia/cdparanoia-III-"
170 "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80"))
171 (patches (search-patches "cdparanoia-fpic.patch"))
172 (modules '((guix build utils)))
174 ;; Make libraries respect LDFLAGS.
175 '(substitute* '("paranoia/Makefile.in" "interface/Makefile.in")
176 (("-Wl,-soname") "$(LDFLAGS) -Wl,-soname")))))
177 (build-system gnu-build-system)
179 `(#:tests? #f ; there is no check target
180 #:configure-flags ; Add $libdir to the RUNPATH of all the executables.
181 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
182 (home-page "http://www.xiph.org/paranoia/")
183 (synopsis "Audio CD reading utility")
184 (description "Cdparanoia retrieves audio tracks from CDDA capable CDROM
185 drives. The data can be saved to a file or directed to standard output
186 in WAV, AIFF, AIFF-C or raw format. Most ATAPI, SCSI and several
187 proprietary CDROM drive makes are supported; cdparanoia can determine if the
188 target drive is CDDA capable. In addition to simple reading, cdparanoia adds
189 extra-robust data verification, synchronization, error handling and scratch
190 reconstruction capability.")
191 (license gpl2))) ; libraries under lgpl2.1
193 (define-public dvdisaster
199 (uri (string-append "http://dvdisaster.net/downloads/dvdisaster-"
203 "0f8gjnia2fxcbmhl8b3qkr5b7idl8m855dw7xw2fnmbqwvcm6k4w"))))
204 (build-system gnu-build-system)
208 `(("gettext" ,gettext-minimal)
209 ("pkg-config" ,pkg-config)
212 `(;; Parallel builds appear to be unsafe, see
213 ;; <http://hydra.gnu.org/build/49331/nixlog/1/raw>.
215 #:tests? #f)) ; no check target
216 (home-page "http://dvdisaster.net/en/index.html")
217 (synopsis "Error correcting codes for optical media images")
218 (description "Optical media (CD,DVD,BD) keep their data only for a
219 finite time (typically for many years). After that time, data loss develops
220 slowly with read errors growing from the outer media region towards the
223 Dvdisaster stores data on CD/DVD/BD (supported media) in a way that it is
224 fully recoverable even after some read errors have developed. This enables
225 you to rescue the complete data to a new medium.
227 Data loss is prevented by using error correcting codes. Error correction
228 data is either added to the medium or kept in separate error correction
229 files. Dvdisaster works at the image level so that the recovery does not
230 depend on the file system of the medium. The maximum error correction
231 capacity is user-selectable.")
234 (define-public libcue
241 "https://github.com/lipnitsk/libcue/archive/v"
243 (file-name (string-append name "-" version ".tar.gz"))
246 "1fradl3dx0pyy9rn1a0gak9gzgg40wax61f2s00zks7rwl0xv398"))))
247 (build-system cmake-build-system)
251 (home-page "https://github.com/lipnitsk/libcue")
252 (synopsis "C library to parse cue sheets")
253 (description "Libcue is a C library to parse so-called @dfn{cue sheets}
254 which contain meta-data for CD/DVD tracks. It provides an API to manipulate
258 (define-public cd-discid
262 (home-page "http://linukz.org/cd-discid.shtml")
265 (uri (string-append "http://linukz.org/download/cd-discid-"
269 "0qrcvn7227qaayjcd5rm7z0k5q89qfy5qkdgwr5pd7ih0va8rmpz"))
270 (modules '((guix build utils)))
272 '(substitute* "Makefile"
273 (("/usr/bin/install")
275 (build-system gnu-build-system)
278 #:phases (alist-delete 'configure %standard-phases)
279 #:make-flags (list "CC=gcc"
280 (string-append "PREFIX="
281 (assoc-ref %outputs "out")))))
282 (synopsis "Get CDDB discid information from an audio CD")
284 "cd-discid is a command-line tool to retrieve CDDB discid information
292 (home-page "https://abcde.einval.com/")
295 (uri (string-append home-page "/download/abcde-"
299 "1pakpi41k8yd780mfp0snhia6mmwjwxk9lcrq6gynimch8b8hfda"))
300 (modules '((guix build utils)))
302 '(substitute* "Makefile"
303 (("/usr/bin/install")
306 (string-append "etcdir = $(prefix)/etc\n"))))))
307 (build-system gnu-build-system)
310 (modify-phases %standard-phases
312 (lambda* (#:key outputs inputs #:allow-other-keys)
313 (substitute* "Makefile"
315 (string-append "prefix = "
316 (assoc-ref outputs "out")
318 (("^sysconfdir = .*$")
319 (string-append "sysconfdir = "
320 (assoc-ref outputs "out")
323 (add-after 'install 'wrap
324 (lambda* (#:key inputs outputs #:allow-other-keys)
325 (let ((wget (assoc-ref inputs "wget"))
326 (vorbis (assoc-ref inputs "vorbis-tools"))
327 (parano (assoc-ref inputs "cdparanoia"))
328 (which (assoc-ref inputs "which"))
329 (discid (assoc-ref inputs "cd-discid"))
330 (out (assoc-ref outputs "out")))
334 (,(string-append out "/bin:"
342 (find-files (string-append out "/bin")
344 #:tests? #f)) ; no test target
346 (inputs `(("wget" ,wget)
348 ("cdparanoia" ,cdparanoia)
349 ("cd-discid" ,cd-discid)
350 ("vorbis-tools" ,vorbis-tools)
352 ;; A couple of Python and Perl scripts are included.
356 (synopsis "Command-line audio CD ripper")
358 "abcde is a front-end command-line utility (actually, a shell script)
359 that grabs tracks off a CD, encodes them to Ogg/Vorbis, MP3, FLAC, Ogg/Speex
360 and/or MPP/MP+ (Musepack) format, and tags them, all in one go.")