summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Goaziou <[email protected]>2025-03-09 09:24:43 +0100
committerNicolas Goaziou <[email protected]>2025-03-09 09:28:17 +0100
commitc4f297a664869a18126b66eb5209de1fcceb42d8 (patch)
tree6e754a4eae25bed9bed6e2c150abe4bd7d011c14 /gnu
parent32b2ee45dec470786a384313fe47c5a3245b0a83 (diff)
gnu: plover: Add udev rule.
* gnu/packages/stenography.scm (plover)[arguments]: Set up a udev rules file for access to /dev/uinput. Remove unnecessary workaroud for Wayland as it is now supported. Change-Id: Iff57a80ffdbc148232b131e5d61671611fbb1e15
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/stenography.scm23
1 files changed, 13 insertions, 10 deletions
diff --git a/gnu/packages/stenography.scm b/gnu/packages/stenography.scm
index 64663e8a3a..6c68abe24a 100644
--- a/gnu/packages/stenography.scm
+++ b/gnu/packages/stenography.scm
@@ -92,16 +92,19 @@
(,(search-input-directory inputs "/lib/qt5/plugins/")))
`("LD_LIBRARY_PATH" prefix
(,(string-append #$(this-package-input "dbus") "/lib"))))))
- (add-after 'wrap-executable 'run-on-xwayland
- ;; By default, Plover won't run on Wayland, and requires a call to
- ;; xhost to run on XWayland.
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((plover (string-append #$output "/bin/plover"))
- (xhost (search-input-file inputs "bin/xhost")))
- (substitute* plover
- (("exec .*" line)
- (string-append xhost " +si:localuser:$USER\n"
- line)))))))))
+ (add-after 'install 'install-udev-rules
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (rules (string-append out "/lib/udev/rules.d")))
+ (mkdir-p rules)
+ (call-with-output-file
+ (string-append rules "/99-plover-uinput.rules")
+ (lambda (port)
+ (display
+ (string-append
+ "KERNEL==\"uinput\", MODE=\"0660\", "
+ "GROUP=\"input\", OPTIONS+=\"static_node=uinput\"\n")
+ port)))))))))
(native-inputs
(list python-babel
python-evdev