gnu: beep: Add phase install-rules.

* gnu/packages/terminals.scm (beep): Add phase install-rules.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Nicolas Graves 2023-10-28 16:16:46 +02:00 committed by Ludovic Courtès
parent af2735e874
commit ff9d32df33
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -603,7 +603,18 @@ (define-public beep
;; 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"))))
(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\"")))))))))
(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