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