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