diff options
author | Nicolas Graves <ngraves@ngraves.fr> | 2024-05-10 00:53:10 +0200 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-13 20:18:49 +0000 |
commit | 41494a7035bbc9b00922f890e961985a88888741 (patch) | |
tree | 4a0cec6d75c28cbc382c9c3e60beee7f3e053ae7 /gnu/packages/xorg.scm | |
parent | fa2a30fa5add5644c65e5a2cba5973648379a95a (diff) |
gnu: python-xcffib: Move to (gnu packages xorg).
* /gnu/packages/python-xyz.scm (python-xcffib): Move from here…
* gnu/packages/xorg.scm (python-xcffib): …to here.
The package's build is fully rewritten and updated to version 1.5.0.
Change-Id: Ia77b9fc2160dacd77c3eaf4199278046a52515d7
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages/xorg.scm')
-rw-r--r-- | gnu/packages/xorg.scm | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index e725b5c843..562c0facf0 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -66,6 +66,7 @@ #:use-module (guix build-system meson) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages aidc) @@ -94,6 +95,7 @@ #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages libedit) + #:use-module (gnu packages libffi) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) #:use-module (gnu packages m4) @@ -1726,6 +1728,45 @@ network-transparent printing system.") generate code for the @code{python-xcbffib} package.") (license license:expat))) +(define-public python-xcffib + (package + (name "python-xcffib") + (version "1.5.0") + (source (package-source xcffibgen)) + (build-system pyproject-build-system) + (native-inputs + (list pkg-config which xcb-proto xcffibgen)) + (inputs + (list libxcb)) + (propagated-inputs + (list python-cffi ; used at run time + python-six)) + (arguments + (list + ;; Tests seem to require version 3.12 of Python. + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'generate-bindings + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile" + (("^GEN=.*") + (format #f "GEN=~a~%" + (search-input-file inputs "/bin/xcffibgen")))) + (invoke "make" "xcffib"))) + (add-before 'build 'fix-libxcb-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "xcffib/__init__.py" + (("ctypes\\.util\\.find_library\\(\"xcb\"\\)") + (format #f "~s" + (search-input-file inputs "/lib/libxcb.so.1"))))))))) + (home-page "https://github.com/tych0/xcffib") + (synopsis "XCB Python bindings") + (description + "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds +support for Python 3 and PyPy. It is based on cffi.") + (license license:expat))) + (define-public randrproto (package (name "randrproto") |