gnu: cdrtools: Don't return #t from snippet.
[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 (patches (search-patches "cdrtools-3.01-mkisofs-isoinfo.patch"))))
318 (build-system gnu-build-system)
319 ;; XXX cdrtools bundles a modified, relicensed early version of cdparanoia.
320 (arguments
321 (list #:make-flags
322 #~(list "RM=rm" "LN=ln" "SYMLINK=ln -s"
323 "CONFIG_SHELL=sh"
324 (string-append "CCOM=" #$(cc-for-target))
325 "LINKMODE=dynamic"
326 (string-append "INS_BASE=" #$output)
327 (string-append "INS_RBASE=" #$output))
328 ;; Parallel builds appear to be unsafe, see
329 ;; https://hydra.gnu.org/build/3346840/log/raw
330 #:parallel-build? #f
331 #:phases
332 #~(modify-phases %standard-phases
333 (delete 'configure)
334 (add-before 'build 'set-linux-headers
335 (lambda _
336 (substitute* "autoconf/configure"
337 (("/usr/src/linux")
338 (assoc-ref %build-inputs "kernel-headers")))))
339 (add-before 'build 'avoid-bogus-RPATH-entry
340 (lambda _
341 (substitute* (append (find-files "DEFAULTS" "^Defaults\\.")
342 (find-files "DEFAULTS_ENG" "^Defaults\\.")
343 (find-files "TEMPLATES" "^Defaults\\."))
344 (("/opt/schily")
345 #$output)))))
346 #:tests? #f)) ; no tests
347 (synopsis "Command line utilities to manipulate and burn CD/DVD/BD images")
348 (description "cdrtools is a collection of command line utilities to create
349 CD's, DVD's or Blue Ray discs. The most important components are
350 @command{cdrecord}, a burning program, @command{cdda2wav}, a CD audio ripper
351 which uses libparanoia, and @command{mkisofs}, which can create various disc
352 images.")
353 (home-page "http://cdrtools.sourceforge.net/private/cdrecord.html")
354
355 ;; mkisofs is GPL, the other programs are CDDL.
356 (license (list cddl1.0 gpl2))))
357
358 (define-public dvd+rw-tools
359 (package
360 (name "dvd+rw-tools")
361 (version "7.1")
362 (source (origin
363 (method url-fetch)
364 (uri (string-append
365 "http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-"
366 version ".tar.gz"))
367 (sha256
368 (base32
369 "1jkjvvnjcyxpql97xjjx0kwvy70kxpiznr2zpjy2hhci5s10zmpq"))
370 (patches (search-patches "dvd+rw-tools-add-include.patch"))))
371 (build-system gnu-build-system)
372 (inputs
373 (list cdrtools))
374 (native-inputs
375 (list m4))
376 (arguments
377 `(#:tests? #f ; No tests.
378 #:phases
379 (modify-phases %standard-phases
380 (add-after 'unpack 'fix-glibc-compatability
381 (lambda* (#:key inputs #:allow-other-keys)
382 ;; We use sed --in-place because substitute* cannot handle the
383 ;; character encoding used by growisofs.c.
384 (invoke "sed" "-i" "-e"
385 (string-append
386 "s,<sys/stat.h>,"
387 "<sys/stat.h>\\\n#include <sys/sysmacros.h>,")
388 "growisofs.c")))
389 (replace 'configure
390 (lambda _ (setenv "prefix" (assoc-ref %outputs "out")) #t))
391 (add-before 'build 'embed-mkisofs
392 (lambda* (#:key inputs #:allow-other-keys)
393 ;; We use sed --in-place because substitute* cannot handle the
394 ;; character encoding used by growisofs.c.
395 (invoke "sed" "-i" "-e"
396 (string-append
397 "s,\"mkisofs\","
398 "\"" (which "mkisofs") "\",")
399 "growisofs.c"))))))
400 (home-page "http://fy.chalmers.se/~appro/linux/DVD+RW/")
401 (synopsis "DVD and Blu-ray Disc burning tools")
402 (description "dvd+rw-tools, mostly known for its command
403 @command{growisofs}, is a collection of DVD and Blu-ray Disc burning tools.
404 It requires another program, such as @command{mkisofs}, @command{genisoimage},
405 or @command{xorrisofs} to create ISO 9660 images.")
406 (license gpl2)))
407
408 (define-public dvdisaster
409 (package
410 (name "dvdisaster")
411 (version "0.79.9")
412 (source
413 (origin
414 (method url-fetch)
415 (uri (string-append "https://dvdisaster.jcea.es/downloads/dvdisaster-"
416 version ".tar.bz2"))
417 (sha256
418 (base32 "1hz3fvqfdrwb7dn6ggqkpcgyjag37ivm1layw27ncjz9glklxjbr"))))
419 (build-system gnu-build-system)
420 (inputs
421 (list gtk+-2))
422 (native-inputs
423 `(("gettext" ,gettext-minimal)
424 ("pkg-config" ,pkg-config)
425 ("which" ,which)))
426 (arguments
427 `(;; Parallel builds appear to be unsafe, see
428 ;; <http://hydra.gnu.org/build/49331/nixlog/1/raw>.
429 #:parallel-build? #f
430 #:phases
431 (modify-phases %standard-phases
432 (replace 'check
433 (lambda _
434 (with-directory-excursion "regtest"
435 (substitute* "common.bash"
436 (("ISODIR=/var/tmp/regtest") "ISODIR=/tmp"))
437 (for-each invoke (find-files "." "rs.*\\.bash")))))
438 (add-after 'install 'install-desktop
439 (lambda* (#:key outputs #:allow-other-keys)
440 (let* ((datadir (string-append (assoc-ref outputs "out") "/share")))
441 (substitute* "contrib/dvdisaster.desktop"
442 (("dvdisaster48.png") "dvdisaster.png"))
443 (install-file "contrib/dvdisaster.desktop"
444 (string-append datadir "/applications"))
445 (for-each
446 (lambda (png)
447 (let* ((size (substring png
448 (string-index png char-set:digit)
449 (string-rindex png #\.)))
450 (icondir (string-append datadir "/icons/"
451 size "x" size "/apps")))
452 (mkdir-p icondir)
453 (copy-file png (string-append icondir "/dvdisaster.png"))))
454 (find-files "contrib" "dvdisaster[0-9]*\\.png"))
455 (mkdir-p (string-append datadir "/pixmaps"))
456 (copy-file "contrib/dvdisaster48.xpm"
457 (string-append datadir "/pixmaps/dvdisaster.xpm")))))
458 (add-after 'install 'remove-uninstall-script
459 (lambda* (#:key outputs #:allow-other-keys)
460 (let* ((out (assoc-ref outputs "out")))
461 (delete-file
462 (string-append out "/bin/dvdisaster-uninstall.sh"))))))))
463 (home-page "https://dvdisaster.jcea.es/")
464 (synopsis "Error correcting codes for optical media images")
465 (description "Optical media (CD,DVD,BD) keep their data only for a
466 finite time (typically for many years). After that time, data loss develops
467 slowly with read errors growing from the outer media region towards the
468 inside.
469
470 Dvdisaster stores data on CD/DVD/BD (supported media) in a way that it is
471 fully recoverable even after some read errors have developed. This enables
472 you to rescue the complete data to a new medium.
473
474 Data loss is prevented by using error correcting codes. Error correction
475 data is either added to the medium or kept in separate error correction
476 files. Dvdisaster works at the image level so that the recovery does not
477 depend on the file system of the medium. The maximum error correction
478 capacity is user-selectable.")
479 (license gpl2+)))
480
481 (define-public dvdstyler
482 (package
483 (name "dvdstyler")
484 (version "3.0.4")
485 (source
486 (origin
487 (method url-fetch)
488 (uri (string-append "mirror://sourceforge/dvdstyler/dvdstyler/"
489 version "/DVDStyler-" version ".tar.bz2"))
490 (sha256
491 (base32
492 "0lwc0hn94m9r8fi07sjqz3fr618l6lnw3zsakxw7nlgnxbjsk7pi"))))
493 (build-system gnu-build-system)
494 (arguments
495 `(#:configure-flags
496 (list (string-append "XMLTO="
497 (assoc-ref %build-inputs "xmlto")
498 "/bin/xmlto --searchpath "
499 (assoc-ref %build-inputs "docbook-xsl")
500 "/xml/xsl/docbook-xsl-" ,(package-version docbook-xsl)
501 "/htmlhelp:"
502 (assoc-ref %build-inputs "docbook-xml")
503 "/xml/dtd/docbook"))
504 #:phases
505 (modify-phases %standard-phases
506 (add-after 'install 'wrap-program
507 (lambda* (#:key inputs outputs #:allow-other-keys)
508 (wrap-program (string-append (assoc-ref outputs "out") "/bin/dvdstyler")
509 `("PATH" ":" prefix
510 (,(string-join
511 (map (lambda (in) (string-append (assoc-ref inputs in) "/bin"))
512 '("cdrtools" "dvdauthor" "dvd+rw-tools" "ffmpeg"))
513 ":"))))
514 #t)))
515 #:tests? #f)) ; No tests.
516 (inputs ; TODO package bundled wxvillalib
517 `(("wxwidgets" ,wxwidgets-3.1)
518 ("wssvg" ,wxsvg)
519 ("dbus" ,dbus)
520 ("cdrtools" ,cdrtools)
521 ("dvd+rw-tools" ,dvd+rw-tools)
522 ("dvdauthor" ,dvdauthor)
523 ("eudev" ,eudev)
524 ("fontconfig" ,fontconfig)
525 ("libexif" ,libexif)
526 ("libjpeg" ,libjpeg-turbo)
527 ("ffmpeg" ,ffmpeg-3.4)))
528 (native-inputs
529 `(("pkg-config" ,pkg-config)
530 ("flex" ,flex)
531 ("python" ,python-2)
532 ("xmlto" ,xmlto)
533 ("gettext" ,gettext-minimal)
534 ("docbook-xml" ,docbook-xml)
535 ("docbook-xsl" ,docbook-xsl)
536 ("zip" ,zip)))
537 (synopsis "DVD authoring application")
538 (description "DVDStyler is a DVD authoring application which allows users
539 to burn video files in many formats to DVD discs, complete with individually
540 designed menus. It can be used to create professional-looking DVD's with
541 custom buttons, backgrounds and animations, from within a user-friendly
542 graphical interface.")
543 (home-page "https://www.dvdstyler.org")
544 (license gpl2)))
545
546 (define-public libcue
547 (package
548 (name "libcue")
549 (version "2.2.1")
550 (source (origin
551 (method git-fetch)
552 (uri (git-reference
553 (url "https://github.com/lipnitsk/libcue")
554 (commit (string-append "v" version))))
555 (file-name (git-file-name name version))
556 (sha256
557 (base32
558 "1iqw4n01rv2jyk9lksagyxj8ml0kcfwk67n79zy1r6zv1xfp5ywm"))))
559 (build-system cmake-build-system)
560 (arguments
561 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
562 (native-inputs
563 (list bison flex))
564 (home-page "https://github.com/lipnitsk/libcue")
565 (synopsis "C library to parse cue sheets")
566 (description "Libcue is a C library to parse so-called @dfn{cue sheets}
567 which contain meta-data for CD/DVD tracks. It provides an API to manipulate
568 the data.")
569 (license gpl2+)))
570
571 (define-public cd-discid
572 (package
573 (name "cd-discid")
574 (version "1.4")
575 (home-page "http://linukz.org/cd-discid.shtml")
576 (source (origin
577 (method url-fetch)
578 (uri (string-append "http://linukz.org/download/cd-discid-"
579 version ".tar.gz"))
580 (sha256
581 (base32
582 "0qrcvn7227qaayjcd5rm7z0k5q89qfy5qkdgwr5pd7ih0va8rmpz"))
583 (modules '((guix build utils)))
584 (snippet
585 '(begin
586 (substitute* "Makefile"
587 (("/usr/bin/install")
588 "install"))
589 #t))))
590 (build-system gnu-build-system)
591 (arguments
592 `(#:tests? #f
593 #:phases (modify-phases %standard-phases (delete 'configure))
594 #:make-flags (list ,(string-append "CC=" (cc-for-target))
595 (string-append "PREFIX="
596 (assoc-ref %outputs "out")))))
597 (synopsis "Get CDDB discid information from an audio CD")
598 (description
599 "cd-discid is a command-line tool to retrieve CDDB discid information
600 from an audio CD.")
601 (license gpl2+)))
602
603 (define-public abcde
604 (package
605 (name "abcde")
606 (version "2.9.3")
607 (home-page "https://abcde.einval.com/")
608 (source (origin
609 (method url-fetch)
610 (uri (string-append home-page "/download/abcde-"
611 version ".tar.gz"))
612 (sha256
613 (base32
614 "091ip2iwb6b67bhjsj05l0sxyq2whqjycbzqpkfbpm4dlyxx0v04"))
615 (modules '((guix build utils)))
616 (snippet
617 '(begin
618 (substitute* "Makefile"
619 (("/usr/bin/install")
620 "install"))
621 #t))))
622 (build-system gnu-build-system)
623 (arguments
624 '(#:phases
625 (modify-phases %standard-phases
626 (replace 'configure
627 (lambda* (#:key outputs inputs #:allow-other-keys)
628 (substitute* "Makefile"
629 (("^prefix = .*$")
630 (string-append "prefix = "
631 (assoc-ref outputs "out")
632 "\n"))
633 (("^sysconfdir = .*$")
634 (string-append "sysconfdir = "
635 (assoc-ref outputs "out")
636 "/etc/\n")))
637 #t))
638 (add-after 'install 'wrap
639 (lambda* (#:key inputs outputs #:allow-other-keys)
640 (let ((wget (assoc-ref inputs "wget"))
641 (vorbis (assoc-ref inputs "vorbis-tools"))
642 (parano (assoc-ref inputs "cdparanoia"))
643 (which (assoc-ref inputs "which"))
644 (discid (assoc-ref inputs "cd-discid"))
645 (perl-discid (assoc-ref inputs "perl-musicbrainz-discid"))
646 (perl-ws (assoc-ref inputs "perl-webservice-musicbrainz"))
647 (perl-mojo (assoc-ref inputs "perl-mojolicious"))
648 (flac (assoc-ref inputs "flac"))
649 (out (assoc-ref outputs "out")))
650 (define (wrap file)
651 (wrap-program file
652 `("PATH" ":" prefix
653 (,(string-append out "/bin:"
654 wget "/bin:"
655 flac "/bin:"
656 which "/bin:"
657 vorbis "/bin:"
658 discid "/bin:"
659 parano "/bin")))
660 `("PERL5LIB" ":" prefix
661 (,(string-append perl-discid
662 "/lib/perl5/site_perl:"
663 perl-ws
664 "/lib/perl5/site_perl:"
665 perl-mojo
666 "/lib/perl5/site_perl")))))
667
668 (for-each wrap
669 (find-files (string-append out "/bin")
670 ".*")))
671 #t)))
672 #:tests? #f)) ; no test target
673
674 (inputs (list wget
675 which
676 cdparanoia
677 cd-discid
678 vorbis-tools
679 flac
680 perl-musicbrainz-discid
681 perl-webservice-musicbrainz
682 perl-mojolicious ;indirect dependency
683 ;; A couple of Python and Perl scripts are included.
684 python
685 perl))
686
687 (synopsis "Command-line audio CD ripper")
688 (description
689 "abcde is a front-end command-line utility (actually, a shell script)
690 that grabs tracks off a CD, encodes them to Ogg/Vorbis, MP3, FLAC, Ogg/Speex
691 and/or MPP/MP+ (Musepack) format, and tags them, all in one go.")
692 (license gpl2+)))
693
694 (define-public geteltorito
695 (package
696 (name "geteltorito")
697 (version "0.6")
698 (home-page
699 "https://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/")
700 (source (origin
701 (method url-fetch)
702 (uri (string-append home-page name "-" version ".tar.gz"))
703 (sha256
704 (base32
705 "1gkbm9ahj2mgqrkrfpibzclsriqgsbsvjh19fr815vpd9f6snkxv"))))
706 (build-system gnu-build-system)
707 (arguments
708 `(#:tests? #f ; No tests.
709 #:phases
710 (modify-phases %standard-phases
711 (delete 'configure)
712 (delete 'build)
713 (replace 'install
714 (lambda* (#:key outputs #:allow-other-keys)
715 (let ((out (assoc-ref outputs "out")))
716 (install-file "geteltorito"
717 (string-append out "/bin"))))))))
718 (inputs (list perl))
719 (synopsis "Extract the boot image from a CD-ROM")
720 (description
721 "@command{geteltorito} can extract the initial/default boot
722 image from CDs (and ISOs) that follow the El Torito specification
723 for bootable CD-ROMs.
724
725 Image data is written to standard output by default and all other
726 information is written to standard error.")
727 (license gpl2+)))
728
729 (define-public asunder
730 (package
731 (name "asunder")
732 (version "2.9.7")
733 (source
734 (origin
735 (method url-fetch)
736 (uri
737 (string-append "http://www.littlesvr.ca/asunder/releases/asunder-"
738 version ".tar.bz2"))
739 (sha256
740 (base32 "1x3l308ss0iqhz90qyjb94gyd8b4piyrm2nzjmg5kf049k9prjf1"))))
741 (build-system glib-or-gtk-build-system)
742 (arguments
743 '(#:out-of-source? #f
744 #:phases (modify-phases %standard-phases
745 (add-after 'install 'wrap
746 (lambda* (#:key inputs outputs #:allow-other-keys)
747 (let ((program (string-append (assoc-ref outputs "out")
748 "/bin/asunder")))
749 (define (bin-directory input-name)
750 (string-append (assoc-ref inputs input-name) "/bin"))
751 (wrap-program program
752 `("PATH" ":" prefix
753 ,(map bin-directory (list "cdparanoia"
754 "lame"
755 "vorbis-tools"
756 "flac"
757 "opus-tools"
758 "wavpack"))))))))))
759 (native-inputs (list intltool pkg-config))
760 ;; TODO: Add the necessary packages for Musepack encoding.
761 (inputs `(("gtk+-2" ,gtk+-2)
762 ("glib" ,glib)
763 ("libcddb" ,libcddb)
764 ("cdparanoia" ,cdparanoia)
765 ("lame" ,lame)
766 ("vorbis-tools" ,vorbis-tools)
767 ("flac" ,flac)
768 ("opus-tools" ,opus-tools)
769 ("wavpack" ,wavpack)))
770 (home-page "http://www.littlesvr.ca/asunder/")
771 (synopsis "Graphical audio CD ripper and encoder")
772 (description
773 "Asunder is a graphical audio CD ripper and encoder. It can save audio
774 tracks as WAV, MP3, Ogg Vorbis, FLAC, Opus, Wavpack, and Musepack. It can use
775 CDDB to name and tag each track automatically, and it allows for each track to
776 be by a different artist. Asunder can encode to multiple formats in one
777 session, and it can create M3U playlists.")
778 (license gpl2)))
779
780 (define-public ripit
781 (package
782 (name "ripit")
783 (version "3.9.0")
784 (source
785 (origin
786 (method url-fetch)
787 ;; The original suwald.com domain has expired.
788 (uri (list
789 (string-append "https://web.archive.org/web/20160327050927/"
790 "http://suwald.com/ripit/ripit-" version ".tar.gz")
791 (string-append "https://ponce.cc/slackware/sources/repo/ripit-"
792 version ".tar.gz")))
793 (sha256
794 (base32 "0ap71x477jy9c4jiqazb3y45hxdxm3jbq24x05g3vjyqzigi4x1b"))))
795 (build-system gnu-build-system)
796 (arguments
797 `(#:tests? #f ; no test suite
798 #:phases
799 (modify-phases %standard-phases
800 (delete 'configure)
801 (add-after 'unpack 'patch-usr-bin-install
802 (lambda* (#:key inputs outputs #:allow-other-keys)
803 (substitute* "Makefile"
804 (("/usr/bin/install") (string-append
805 (assoc-ref inputs "coreutils")
806 "/bin/install"))
807 (("\\$\\(DESTDIR\\)/usr/local") (assoc-ref outputs "out"))
808 (("../../etc") "etc")))))))
809 (native-inputs
810 (list coreutils))
811 (inputs
812 (list perl))
813 (propagated-inputs
814 (list cdparanoia flac vorbis-tools wavpack perl-cddb-get))
815 (home-page (string-append "https://web.archive.org/web/20170119092156/"
816 "http://www.suwald.com/ripit/about.php"))
817 (synopsis "Command-line program to extract audio CDs")
818 (description "RipIT is used to extract audio from CDs.")
819 (license gpl2)))
820
821 (define-public ccd2cue
822 (package
823 (name "ccd2cue")
824 (version "0.5")
825 (source
826 (origin
827 (method url-fetch)
828 (uri (string-append
829 "mirror://gnu/ccd2cue/ccd2cue-" version
830 ".tar.gz"))
831 (sha256
832 (base32
833 "1icrkg25hwx4gsn3dski2172ia4ywjh8m1sa17zmjclnrgdwy9c7"))))
834 (build-system gnu-build-system)
835 (synopsis "CCD to CUE sheet conversion")
836 (description
837 "GNU ccd2cue is a preprocessor for CD burning software that allows
838 the conversion of the proprietary CCD format to the CUE format, which
839 is well-supported by free software. These files are commonly
840 distributed with CD images and are used to describe how tracks are
841 laid out on the image.")
842 (home-page "https://www.gnu.org/software/ccd2cue/")
843 (license gpl3+)))
844
845 (define-public libburn
846 (package
847 (name "libburn")
848 (version "1.5.4")
849 (source (origin
850 (method url-fetch)
851 (uri (string-append "http://files.libburnia-project.org/releases/"
852 "libburn-" version ".tar.gz"))
853 (sha256
854 (base32
855 "0m1vyry6pi115nysfgb0cg313qqhnlxqdg7f920wpiar0z8mjl2j"))))
856 (build-system gnu-build-system)
857 (native-inputs
858 (list pkg-config))
859 (home-page "https://dev.lovelyhq.com/libburnia/libburn")
860 (synopsis "Library for reading and writing optical discs")
861 (description
862 "Libburn is a library for reading and writing optical discs.
863 Supported media are: CD-R, CD-RW, DVD-RAM, DVD+RW, DVD+R, DVD+R/DL,
864 DVD-RW, DVD-R, DVD-R/DL, BD-R, and BD-RE.")
865 (license gpl2)))
866
867 (define-public libisofs
868 (package
869 (name "libisofs")
870 (version "1.5.4")
871 (source (origin
872 (method url-fetch)
873 (uri (string-append "http://files.libburnia-project.org/releases/"
874 "libisofs-" version ".tar.gz"))
875 (sha256
876 (base32
877 "13m82l13cb5d7ca53dv3akma1jr9gw0hnnshdwqpj6ahly0fv85a"))))
878 (build-system gnu-build-system)
879 (inputs
880 (list zlib acl))
881 (native-inputs
882 (list pkg-config))
883 (home-page "https://dev.lovelyhq.com/libburnia/libisofs")
884 (synopsis "Library to create ISO 9660 images")
885 (description
886 "Libisofs creates ISO 9660 (also known as ECMA-119) file system images
887 which can either be written to POSIX file objects or handed over to
888 libburn for being written directly to optical media.
889 It can read metadata of ISO 9660 filesystems, manipulate them, and use them
890 to produce new complete file system images or add-on images to be appended
891 to the read file system image.
892 Supported extensions to ISO 9660 are Rock Ridge, Joliet, AAIP, zisofs.")
893 (license gpl2+)))
894
895 (define-public cdrkit-libre
896 (package
897 (name "cdrkit-libre")
898 (version "1.1.11")
899 (source (origin
900 (method url-fetch)
901 ;; cdrkit.org is dead.
902 ;;
903 ;; ‘cdrkit-libre’ removes a couple of problematic files,
904 ;; see <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32165#14>.
905 (uri (string-append
906 "https://repo.parabola.nu/other/cdrkit-libre/cdrkit-libre-"
907 version ".tar.gz"))
908 (sha256
909 (base32
910 "0g2zyzb56czh429qy87lvaddzjnlcq8c616ddxsmsshz3clhyzrh"))
911 (patches (search-patches "cdrkit-libre-cross-compile.patch"))
912 (modules '((guix build utils)))
913 (snippet
914 #~(begin
915 ;; Fix building with gcc-10.
916 (substitute* "genisoimage/genisoimage.h"
917 (("char\t\t\\*outfile")
918 "extern char\t*outfile"))))))
919 (build-system cmake-build-system)
920 (inputs
921 (list bzip2 libcap perl zlib))
922 (arguments
923 `(#:tests? #f ;no tests
924 #:phases
925 (modify-phases %standard-phases
926 (add-after 'install 'old-cdrecord
927 (lambda* (#:key outputs #:allow-other-keys)
928 (with-directory-excursion (string-append (assoc-ref outputs "out")
929 "/bin")
930 (symlink "genisoimage" "mkisofs")
931 (symlink "wodim" "cdrecord"))
932 #t)))))
933 (home-page "https://repo.parabola.nu/other/cdrkit-libre/")
934 (synopsis "Command-line CD/DVD recorder")
935 (description "Cdrkit is a suite of programs for recording CDs and DVDs,
936 blanking CD-RW media, creating ISO-9660 file system images, extracting audio
937 CD data, and more. It's mostly compatible with @code{cdrtools}.")
938 (license gpl2+)))
939
940 (define-public libmirage
941 (package
942 (name "libmirage")
943 (version "3.2.6")
944 (source (origin
945 (method url-fetch)
946 (uri (string-append
947 "mirror://sourceforge/cdemu/libmirage/libmirage-"
948 version ".tar.xz"))
949 (sha256
950 (base32
951 "19pjdmxhzl8y3brhg8fsv99b6jg4lfnl8jvcjgm4jmqrr684czr5"))))
952 (build-system cmake-build-system)
953 (native-inputs
954 (list pkg-config intltool))
955 (inputs
956 (list glib))
957 (arguments
958 ;; No tests.
959 '(#:tests? #f))
960 (home-page "https://cdemu.sourceforge.io/")
961 (synopsis "CD-ROM image access library")
962 (description "libMirage is a CD-ROM image access library. It supports the
963 following formats: B6T, C2D, CCD, CDI, CIF, CUE, ISO, MDS, MDX, NRG, TOC. It
964 is written in C and based on GLib. Its aim is to provide uniform access to
965 the data stored in various image formats.")
966 (license gpl2+)))
967
968 (define-public cdemu-daemon
969 (package
970 (name "cdemu-daemon")
971 (version "3.2.6")
972 (source (origin
973 (method url-fetch)
974 (uri (string-append
975 "mirror://sourceforge/cdemu/cdemu-daemon/"
976 "cdemu-daemon-" version ".tar.xz"))
977 (sha256
978 (base32
979 "13vxhl7ik3h5qnfh6m0zxywb8qzx1n46akrm6rp19ikmxzih9r56"))))
980 (build-system cmake-build-system)
981 (native-inputs
982 (list pkg-config intltool))
983 (inputs
984 (list libmirage glib ao))
985 (arguments
986 ;; No tests.
987 '(#:tests? #f))
988 (home-page "https://cdemu.sourceforge.io/")
989 (synopsis "CD/DVD-ROM device emulator")
990 (description "CDemu is a software suite designed to emulate an optical
991 drive and disc (including CD-ROMs and DVD-ROMs).")
992 (license gpl2+)))
993
994 (define-public cdemu-client
995 (package
996 (name "cdemu-client")
997 (version "3.2.5")
998 (source (origin
999 (method url-fetch)
1000 (uri (string-append
1001 "mirror://sourceforge/cdemu/cdemu-client/cdemu-client-"
1002 version ".tar.xz"))
1003 (sha256
1004 (base32
1005 "1prrdhv0ia0axc6b73crszqzh802wlkihz6d100yvg7wbgmqabd7"))))
1006 (build-system cmake-build-system)
1007 (native-inputs
1008 (list pkg-config intltool))
1009 (inputs
1010 (list python python-pygobject cdemu-daemon))
1011 (arguments
1012 ;; No tests.
1013 `(#:tests? #f
1014 #:phases
1015 (modify-phases %standard-phases
1016 (add-after 'install 'patch-shebang
1017 (lambda* (#:key outputs #:allow-other-keys)
1018 (patch-shebang (string-append (assoc-ref outputs "out")
1019 "/bin/cdemu"))
1020 #t))
1021 (add-after 'patch-shebang 'wrap-program
1022 (lambda* (#:key outputs #:allow-other-keys)
1023 (let ((prog (string-append (assoc-ref outputs "out")
1024 "/bin/cdemu")))
1025 (wrap-program prog
1026 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))))
1027 #t))))))
1028 (home-page "https://cdemu.sourceforge.io/")
1029 (synopsis "Command-line client for controlling cdemu-daemon")
1030 (description "CDEmu client is a simple command-line client for controlling
1031 CDEmu daemon.
1032
1033 It provides a way to perform the key tasks related to controlling the CDEmu
1034 daemon, such as loading and unloading devices, displaying devices' status and
1035 retrieving/setting devices' debug masks.")
1036 (license gpl2+)))