diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 27b1e1a2ac..b754e4c166 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -603,7 +603,18 @@ (define-public beep ;; The build environment lacks /dev/{console,tty*}. ;; In fact, even nckx's regular Guix System lacks ttyS1… ((": 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") (description "beep allows the user to control the PC speaker with precision, allowing different sounds to indicate different events. While it can be run