From 58b237deb90d798528a3f21e403541a8255ef5cd Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Wed, 21 Jan 2026 20:20:14 +0100 Subject: gnu: Add python-pynput. * gnu/packages/python-xyz.scm (python-pynput): New variable. Signed-off-by: Liliana Marie Prikler --- gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'gnu') 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") -- cgit v1.3