[bug#73523,3/3,3/3] gnu: add pywlroots

Message ID 20240928063520.24064-3-bigbookofbug@proton.me
State New
Headers
Series None |

Commit Message

tusharhero--- via Guix-patches via Sept. 28, 2024, 6:35 a.m. UTC
From: big bug <bigbookofbug@proton.me>

---
 gnu/packages/python-xyz.scm | 38 +++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
  

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 29a48dacaa..4a0b74d4f9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11064,6 +11064,44 @@  (define-public python-pywayland
     (description "PyWayland provides a wrapper to the libwayland library using the CFFI library to provide access to the Wayland library calls and written in pure Python.")
     (license license:asl2.0)))
 
+(define-public python-pywlroots
+  (package
+   (name "python-pywlroots")
+   (version "0.17.0")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (pypi-uri "pywlroots" version))
+     (sha256
+      (base32 "1frxqkkh2867rh0c6j0jsmzrga8k6235f6ygkk4cph2883hjpjvj"))))
+   (build-system pyproject-build-system)
+   (arguments
+    (list
+     #:tests? #f
+     #:phases
+     #~(modify-phases %standard-phases
+		      (add-before 'build 'pre-build
+				  ;;needed, otherwise pixman.h will not be found
+				  (lambda* (#:key inputs #:allow-other-keys)
+				    (let ((pixman (string-append
+						   (assoc-ref inputs "pixman")
+						   "/include")))
+				      (setenv "C_INCLUDE_PATH"
+					      (string-append pixman "/" "pixman-1" ":"
+							     (or (getenv "C_INCLUDE_PATH")
+								 "")))))))))
+   (inputs
+    (list pixman wayland libinput libxkbcommon wlroots))
+   (propagated-inputs (list python-pywayland python-xkbcommon))
+   (native-inputs (append (if (%current-target-system)
+			      (list pkg-config-for-build wayland) '())
+			  (list pkg-config
+				python-cffi)))
+   (home-page "https://github.com/flacjacket/pywlroots")
+   (synopsis "Python binding to the wlroots library using cffi.")
+   (description "A Python binding to the wlroots library using cffi. The library uses pywayland to provide the Wayland bindings and python-xkbcommon to provide wlroots keyboard functionality.")
+   (license license:ncsa)))
+
 (define-public python-click-didyoumean
   (package
     (name "python-click-didyoumean")