gnu: abcde: Improve style.

* gnu/packages/cdrom.scm (abcde):
[source]: Run guix style, remove snippet.
[arguments]<#:modules>: Add srfi-26.
<#:phases>: Remove 'configure, migrate it and the snippet to
<#:make-flags>. Rewrite the 'wrap phase.
[native-inputs]: Add coreutils-minimal.

Signed-off-by: jgart <jgart@dismail.de>
This commit is contained in:
Nicolas Graves 2025-08-14 13:27:27 +02:00 committed by jgart
parent 5940faa8d1
commit dd63521f33
No known key found for this signature in database
GPG key ID: A52AA2B477B6DD35

View file

@ -717,69 +717,44 @@ from an audio CD.")
(name "abcde") (name "abcde")
(version "2.9.3") (version "2.9.3")
(home-page "https://abcde.einval.com/") (home-page "https://abcde.einval.com/")
(source (origin (source
(method url-fetch) (origin
(uri (string-append home-page "/download/abcde-" (method url-fetch)
version ".tar.gz")) (uri (string-append home-page "/download/abcde-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32 "091ip2iwb6b67bhjsj05l0sxyq2whqjycbzqpkfbpm4dlyxx0v04"))))
"091ip2iwb6b67bhjsj05l0sxyq2whqjycbzqpkfbpm4dlyxx0v04"))
(modules '((guix build utils)))
(snippet
'(begin
(substitute* "Makefile"
(("/usr/bin/install")
"install"))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:tests? #f ; No test target.
(replace 'configure #:modules `((guix build gnu-build-system)
(lambda* (#:key outputs inputs #:allow-other-keys) (guix build utils)
(substitute* "Makefile" (srfi srfi-26))
(("^prefix = .*$") #:make-flags
(string-append "prefix = " #~(list (string-append "INSTALL="
(assoc-ref outputs "out") #$(this-package-native-input "coreutils-minimal")
"\n")) "/bin/install -c")
(("^sysconfdir = .*$") (string-append "prefix = " #$output)
(string-append "sysconfdir = " (string-append "sysconfdir = " #$output "/etc/"))
(assoc-ref outputs "out") #:phases
"/etc/\n"))))) #~(modify-phases %standard-phases
(add-after 'install 'wrap (delete 'configure)
(lambda* (#:key inputs outputs #:allow-other-keys) (add-after 'install 'wrap
(let ((wget (assoc-ref inputs "wget")) (lambda* (#:key inputs #:allow-other-keys)
(vorbis (assoc-ref inputs "vorbis-tools")) (for-each
(parano (assoc-ref inputs "cdparanoia")) (cut wrap-program <>
(which (assoc-ref inputs "which")) `("PATH" ":" prefix
(discid (assoc-ref inputs "cd-discid")) ,(map (compose dirname (cut search-input-file inputs <>))
(perl-discid (assoc-ref inputs "perl-musicbrainz-discid")) (list "/bin/wget"
(perl-ws (assoc-ref inputs "perl-webservice-musicbrainz")) "/bin/flac"
(perl-mojo (assoc-ref inputs "perl-mojolicious")) "/bin/which"
(flac (assoc-ref inputs "flac")) "/bin/ogginfo"
(out (assoc-ref outputs "out"))) "/bin/cd-discid"
(define (wrap file) "/bin/cdparanoia")))
(wrap-program file `("PERL5LIB" ":" prefix
`("PATH" ":" prefix (,(getenv "PERL5LIB"))))
(,(string-append out "/bin:" (find-files (string-append #$output "/bin"))))))))
wget "/bin:" (native-inputs (list coreutils-minimal))
flac "/bin:"
which "/bin:"
vorbis "/bin:"
discid "/bin:"
parano "/bin")))
`("PERL5LIB" ":" prefix
(,(string-append perl-discid
"/lib/perl5/site_perl:"
perl-ws
"/lib/perl5/site_perl:"
perl-mojo
"/lib/perl5/site_perl")))))
(for-each wrap
(find-files (string-append out "/bin")
".*"))))))
#:tests? #f)) ; no test target
(inputs (list bash-minimal (inputs (list bash-minimal
wget wget
which which
@ -793,7 +768,6 @@ from an audio CD.")
;; A couple of Python and Perl scripts are included. ;; A couple of Python and Perl scripts are included.
python python
perl)) perl))
(synopsis "Command-line audio CD ripper") (synopsis "Command-line audio CD ripper")
(description (description
"abcde is a front-end command-line utility (actually, a shell script) "abcde is a front-end command-line utility (actually, a shell script)