summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-01-21 20:20:14 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2026-02-07 22:37:16 +0100
commit58b237deb90d798528a3f21e403541a8255ef5cd (patch)
tree4097b76ec392bcf988b0f4125cdb44515c99f5b3 /gnu/packages
parent629c3b8f985be9b8c6a289d5af296f3c7b61cb31 (diff)
gnu: Add python-pynput.
* gnu/packages/python-xyz.scm (python-pynput): New variable. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-xyz.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2faafa58d7f..b2b837bdd5f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26828,6 +26828,47 @@ environments.")
"PyNamecheap is a Namecheap API client in Python.")
(license license:expat)))
+(define-public python-pynput
+ (package
+ (name "python-pynput")
+ (version "1.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/moses-palmer/pynput")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "00lnram5rm0amp5c1cjsw476bzi59g9m3l76ra29mp4jnz519sdc"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-backend #~'unittest
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "setup.py"
+ (("RUNTIME_PACKAGES \\+ SETUP_PACKAGES")
+ "RUNTIME_PACKAGES"))))
+ (add-before 'check 'start-xserver
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((Xvfb (search-input-file inputs "/bin/Xvfb")))
+ (system (format #f "~a :1 -screen 0 640x480x24 &"
+ Xvfb))
+ (setenv "DISPLAY" ":1")))))))
+ (propagated-inputs
+ (list python-evdev python-xlib))
+ (native-inputs
+ (list python-setuptools xorg-server-for-tests))
+ (home-page "https://github.com/moses-palmer/pynput")
+ (synopsis "Send virtual input commands")
+ (description
+ "This package provides tools to monitor and control user input devices in
+Python.")
+ (license license:lgpl3)))
+
(define-public python-pynixutil
(package
(name "python-pynixutil")