diff mbox series

[bug#73523,v3,3/3] gnu: Add pywlroots version 0.17.0

Message ID 20241025002059.995836-3-aaron.covrig.us@ieee.org
State New
Headers show
Series [bug#73523,v3,1/3] gnu: Add python-xkbcommon version 1.5.1 | expand

Commit Message

Aaron Covrig Oct. 25, 2024, 12:20 a.m. UTC
From: big bug <bigbookofbug@proton.me>

* gnu/packages/python-xyz (python-pywlroots): New variable.
---
 gnu/packages/python-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 41ed393f67..d22fef08b9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -287,6 +287,7 @@  (define-module (gnu packages python-xyz)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages wm)
   #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xdisorg)
@@ -37150,6 +37151,44 @@  (define-public python-pywayland
 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-srt
   (package
     (name "python-srt")