python3Packages.pywlroots: 0.14.12 -> 0.15.3

This commit is contained in:
Charlotte Van Petegem 2022-01-12 10:31:30 +01:00 committed by Jonathan Ringer
parent 9ddd6d7266
commit e2b54ce449
3 changed files with 36 additions and 6 deletions

View File

@ -12,21 +12,27 @@
, wayland
, pywayland
, xkbcommon
, xorg
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pywlroots";
version = "0.14.12";
version = "0.15.3";
src = fetchPypi {
inherit pname version;
sha256 = "80v1kuiYL3OdtDVJj0EvgrO9x1eN8xxUyRuI4Wb4giI=";
sha256 = "sCHeiD6KugHZLtxcVcLggdHC1gqCxStuHy1065TbGiY=";
};
# The XWayland detection uses some hard-coded FHS paths. Since we
# know wlroots was built with xwayland support, replace its
# detection with `return True`.
patches = [ ./xwayland.patch ];
nativeBuildInputs = [ pkg-config ];
propagatedNativeBuildInputs = [ cffi ];
buildInputs = [ libinput libxkbcommon pixman udev wayland wlroots ];
buildInputs = [ libinput libxkbcommon pixman xorg.libxcb udev wayland wlroots ];
propagatedBuildInputs = [ cffi pywayland xkbcommon ];
checkInputs = [ pytestCheckHook ];
@ -40,6 +46,7 @@ buildPythonPackage rec {
homepage = "https://github.com/flacjacket/pywlroots";
description = "Python bindings to wlroots using cffi";
license = licenses.ncsa;
platforms = platforms.linux;
maintainers = with maintainers; [ chvp ];
};
}

View File

@ -0,0 +1,25 @@
diff --git a/wlroots/ffi_build.py b/wlroots/ffi_build.py
index bb07ff8..f19efe3 100644
--- a/wlroots/ffi_build.py
+++ b/wlroots/ffi_build.py
@@ -55,19 +55,7 @@ def has_xwayland() -> bool:
Check for XWayland headers. If present, wlroots was built with XWayland support, so
pywlroots can be too.
"""
- try:
- FFI().verify(
- "#include <wlr/xwayland.h>",
- define_macros=[("WLR_USE_UNSTABLE", 1)],
- include_dirs=["/usr/include/pixman-1", include_dir.as_posix()],
- )
- return True
- except VerificationError:
- print("If XWayland support is not required, ignore the above error message.")
- print(
- "If support is required, ensure wlroots was built with -Dxwayland=enabled."
- )
- return False
+ return True
# backend.h

View File

@ -8278,9 +8278,7 @@ in {
pywizlight = callPackage ../development/python-modules/pywizlight { };
pywlroots = callPackage ../development/python-modules/pywlroots {
wlroots = pkgs.wlroots_0_14;
};
pywlroots = callPackage ../development/python-modules/pywlroots { };
pyxattr = callPackage ../development/python-modules/pyxattr { };