Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / cdrom.scm
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>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
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.
15 ;;;
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.
20 ;;;
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/>.
23
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))
47
48 (define-public libcddb
49 (package
50 (name "libcddb")
51 (version "1.3.2")
52 (source (origin
53 (method url-fetch)
54 (uri (string-append "mirror://sourceforge/libcddb/libcddb/" version
55 "/libcddb-" version ".tar.bz2"))
56 (sha256
57 (base32
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")
63 (description
64 "Libcddb is a C library to access data on a CDDB server (freedb.org). It
65 allows you to:
66
67 1. search the database for possible CD matches;
68
69 2. retrieve detailed information about a specific CD;
70
71 3. submit new CD entries to the database.
72
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.")
77 (license lgpl2.1+)))
78
79 (define-public libcdio
80 (package
81 (name "libcdio")
82 (version "0.93")
83 (source (origin
84 (method url-fetch)
85 (uri (string-append "mirror://gnu/libcdio/libcdio-"
86 version ".tar.gz"))
87 (sha256
88 (base32
89 "0xb9km1750ndr7nglgbv1smv03dy8nkcfd9djbzqn3ldzlicswj9"))))
90 (build-system gnu-build-system)
91 (inputs
92 `(("ncurses" ,ncurses)
93 ("libcddb" ,libcddb)))
94 (native-inputs
95 `(("help2man" ,help2man)
96 ("pkg-config" ,pkg-config)))
97 (home-page "http://www.gnu.org/software/libcdio/")
98 (synopsis "CD Input and Control library")
99 (description
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.")
107 (license gpl3+)))
108
109 (define-public libcdio-paranoia
110 (package
111 (name "libcdio-paranoia")
112 (version "10.2+0.93+1")
113 (source (origin
114 (method url-fetch)
115 (uri (string-append "mirror://gnu/libcdio/libcdio-paranoia-"
116 version ".tar.bz2"))
117 (sha256
118 (base32
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")
125 (description
126 "libcdio-paranoia is an implementation of CD paranoia libraries based on
127 libcdio.")
128 (license gpl3+)))
129
130 (define-public xorriso
131 (package
132 (name "xorriso")
133 (version "1.4.6")
134 (source (origin
135 (method url-fetch)
136 (uri (string-append "mirror://gnu/xorriso/xorriso-"
137 version ".tar.gz"))
138 (sha256
139 (base32
140 "112p0ghwzxrcjbsir1n2jxhq103ckrw93wzvd55qqvzfgs674vsj"))))
141 (build-system gnu-build-system)
142 (inputs
143 `(("acl" ,acl)
144 ("readline" ,readline)
145 ("bzip2" ,bzip2)
146 ("zlib" ,zlib)
147 ("libcdio" ,libcdio)))
148 (home-page "https://www.gnu.org/software/xorriso/")
149 (synopsis "Create, manipulate, burn ISO-9660 file systems")
150 (description
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
156 files.")
157 (license gpl3+)))
158
159 (define-public cdparanoia
160 (package
161 (name "cdparanoia")
162 (version "10.2")
163 (source (origin
164 (method url-fetch)
165 (uri (string-append "http://downloads.xiph.org/releases/"
166 "cdparanoia/cdparanoia-III-"
167 version ".src.tgz"))
168 (sha256
169 (base32
170 "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80"))
171 (patches (search-patches "cdparanoia-fpic.patch"))
172 (modules '((guix build utils)))
173 (snippet
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)
178 (arguments
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
192
193 (define-public dvdisaster
194 (package
195 (name "dvdisaster")
196 (version "0.79.5")
197 (source (origin
198 (method url-fetch)
199 (uri (string-append "http://dvdisaster.net/downloads/dvdisaster-"
200 version ".tar.bz2"))
201 (sha256
202 (base32
203 "0f8gjnia2fxcbmhl8b3qkr5b7idl8m855dw7xw2fnmbqwvcm6k4w"))))
204 (build-system gnu-build-system)
205 (inputs
206 `(("gtk+" ,gtk+-2)))
207 (native-inputs
208 `(("gettext" ,gettext-minimal)
209 ("pkg-config" ,pkg-config)
210 ("which" ,which)))
211 (arguments
212 `(;; Parallel builds appear to be unsafe, see
213 ;; <http://hydra.gnu.org/build/49331/nixlog/1/raw>.
214 #:parallel-build? #f
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
221 inside.
222
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.
226
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.")
232 (license gpl2+)))
233
234 (define-public libcue
235 (package
236 (name "libcue")
237 (version "2.1.0")
238 (source (origin
239 (method url-fetch)
240 (uri (string-append
241 "https://github.com/lipnitsk/libcue/archive/v"
242 version ".tar.gz"))
243 (file-name (string-append name "-" version ".tar.gz"))
244 (sha256
245 (base32
246 "1fradl3dx0pyy9rn1a0gak9gzgg40wax61f2s00zks7rwl0xv398"))))
247 (build-system cmake-build-system)
248 (native-inputs
249 `(("bison" ,bison)
250 ("flex" ,flex)))
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
255 the data.")
256 (license gpl2+)))
257
258 (define-public cd-discid
259 (package
260 (name "cd-discid")
261 (version "1.4")
262 (home-page "http://linukz.org/cd-discid.shtml")
263 (source (origin
264 (method url-fetch)
265 (uri (string-append "http://linukz.org/download/cd-discid-"
266 version ".tar.gz"))
267 (sha256
268 (base32
269 "0qrcvn7227qaayjcd5rm7z0k5q89qfy5qkdgwr5pd7ih0va8rmpz"))
270 (modules '((guix build utils)))
271 (snippet
272 '(substitute* "Makefile"
273 (("/usr/bin/install")
274 "install")))))
275 (build-system gnu-build-system)
276 (arguments
277 '(#:tests? #f
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")
283 (description
284 "cd-discid is a command-line tool to retrieve CDDB discid information
285 from an audio CD.")
286 (license gpl2+)))
287
288 (define-public abcde
289 (package
290 (name "abcde")
291 (version "2.7.2")
292 (home-page "https://abcde.einval.com/")
293 (source (origin
294 (method url-fetch)
295 (uri (string-append home-page "/download/abcde-"
296 version ".tar.gz"))
297 (sha256
298 (base32
299 "1pakpi41k8yd780mfp0snhia6mmwjwxk9lcrq6gynimch8b8hfda"))
300 (modules '((guix build utils)))
301 (snippet
302 '(substitute* "Makefile"
303 (("/usr/bin/install")
304 "install")
305 (("^etcdir = .*$")
306 (string-append "etcdir = $(prefix)/etc\n"))))))
307 (build-system gnu-build-system)
308 (arguments
309 '(#:phases
310 (modify-phases %standard-phases
311 (replace 'configure
312 (lambda* (#:key outputs inputs #:allow-other-keys)
313 (substitute* "Makefile"
314 (("^prefix = .*$")
315 (string-append "prefix = "
316 (assoc-ref outputs "out")
317 "\n"))
318 (("^sysconfdir = .*$")
319 (string-append "sysconfdir = "
320 (assoc-ref outputs "out")
321 "/etc/\n")))
322 #t))
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")))
331 (define (wrap file)
332 (wrap-program file
333 `("PATH" ":" prefix
334 (,(string-append out "/bin:"
335 wget "/bin:"
336 which "/bin:"
337 vorbis "/bin:"
338 discid "/bin:"
339 parano "/bin")))))
340
341 (for-each wrap
342 (find-files (string-append out "/bin")
343 ".*"))))))
344 #:tests? #f)) ; no test target
345
346 (inputs `(("wget" ,wget)
347 ("which" ,which)
348 ("cdparanoia" ,cdparanoia)
349 ("cd-discid" ,cd-discid)
350 ("vorbis-tools" ,vorbis-tools)
351
352 ;; A couple of Python and Perl scripts are included.
353 ("python" ,python)
354 ("perl" ,perl)))
355
356 (synopsis "Command-line audio CD ripper")
357 (description
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.")
361 (license gpl2+)))