gnu: beep: Use G-expressions.

* gnu/packages/terminals.scm (beep)[arguments]:
Rewrite as G-expressions.
This commit is contained in:
Tobias Geerinckx-Rice 2022-05-08 02:00:01 +02:00
parent de15ca7af8
commit e6c3e7d741
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -58,6 +58,7 @@ (define-module (gnu packages terminals)
#:use-module (guix build-system python) #:use-module (guix build-system python)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (gnu packages) #:use-module (gnu packages)
@ -575,27 +576,27 @@ (define-public beep
(base32 "0dgrb5yg4ys1fa4hs95iz3m2yhryfzzw0j6g6yf6vhbys4ihcf40")))) (base32 "0dgrb5yg4ys1fa4hs95iz3m2yhryfzzw0j6g6yf6vhbys4ihcf40"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:make-flags (list #:make-flags
(list (string-append "CC=" ,(cc-for-target)) #~(list (string-append "CC=" #$(cc-for-target))
(string-append "prefix=" (assoc-ref %outputs "out")) (string-append "prefix=" #$output)
(string-append "pkgdocdir=$(docdir)/" ,name "-" ,version)) (string-append "pkgdocdir=$(docdir)/" #$name "-" #$version))
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(delete 'configure) ; no configure script (delete 'configure) ; no configure script
(add-before 'check 'patch-tests (add-before 'check 'patch-tests
(lambda _ (lambda _
(substitute* "GNUmakefile" (substitute* "GNUmakefile"
(("/bin/bash") (("/bin/bash")
(which "bash")) (which "bash"))
;; XXX In the build environment, $(PWD) is the *parent* directory ;; XXX In the build environment, $(PWD) is the *parent* directory
;; /tmp/guix-build-beep-x.y.drv-0! A pure guix shell works fine. ;; /tmp/guix-build-beep-x.y.drv-0! A pure guix shell works fine.
(("\\$\\(PWD\\)" pwd) (("\\$\\(PWD\\)" pwd)
(string-append pwd "/source"))) (string-append pwd "/source")))
(substitute* (find-files "tests" "\\.expected") (substitute* (find-files "tests" "\\.expected")
;; The build environment lacks /dev/{console,tty*}. ;; The build environment lacks /dev/{console,tty*}.
;; In fact, even nckx's regular Guix System lacks ttyS1… ;; In fact, even nckx's regular Guix System lacks ttyS1…
((": Permission denied") ((": Permission denied")
": No such file or directory"))))))) ": No such file or directory")))))))
(synopsis "Linux command-line utility to control the PC speaker") (synopsis "Linux command-line utility to control the PC speaker")
(description "beep allows the user to control the PC speaker with precision, (description "beep allows the user to control the PC speaker with precision,
allowing different sounds to indicate different events. While it can be run allowing different sounds to indicate different events. While it can be run