From eee2c18abae3092e271cdbcda821ce977fb1ee82 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sat, 19 Jul 2025 01:49:50 +0200 Subject: [PATCH] gnu: beep: Improve style. * gnu/packages/terminals.scm (beep)[arguments]<#:phases>: Improve style and remove lint warning (line length). Change-Id: Ib6558c3b9c253dda4c4396783ea2195ab3bd652c Signed-off-by: Sharlatan Hellseher --- gnu/packages/terminals.scm | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 684893255f181f604297bbe08e990ad37f9eb14b..36f2e8016d60c71dae510116af64f9ece6657d62 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -580,10 +580,10 @@ to all types of devices that provide serial consoles.") #~(modify-phases %standard-phases (delete 'configure) ;no configure script (add-before 'check 'patch-tests - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) (substitute* "GNUmakefile" (("/bin/bash") - (which "bash")) + (search-input-file inputs "bin/bash")) ;; XXX In the build environment, $(PWD) is the *parent* directory ;; /tmp/guix-build-beep-x.y.drv-0! A pure guix shell works fine. (("\\$\\(PWD\\)" pwd) @@ -595,13 +595,18 @@ to all types of devices that provide serial consoles.") ": No such file or directory")))) (add-before 'install 'install-rules (lambda _ - (mkdir-p (string-append #$output "/etc/udev/rules.d")) - (with-output-to-file (string-append #$output - "/etc/udev/rules.d/70-pcspkr-beep.rules") - (lambda _ - (display (string-append - "ACTION==\"add\", SUBSYSTEM==\"input\", ATTRS{name}==\"PC Speaker\", " - "ENV{DEVNAME}!=\"\", " "TAG+=\"uaccess\""))))))))) + (let ((rules.d (string-append #$output "/etc/udev/rules.d"))) + (mkdir-p rules.d) + (with-output-to-file + (string-append rules.d "/70-pcspkr-beep.rules") + (lambda _ + (display + (string-join (list "ACTION==\"add\"" + "SUBSYSTEM==\"input\"" + "ATTRS{name}==\"PC Speaker\"" + "ENV{DEVNAME}!=\"\"" + "TAG+=\"uaccess\"") + ", ")))))))))) (synopsis "Linux command-line utility to control the PC speaker") (description "beep allows the user to control the PC speaker with precision, allowing