python3.pkgs.{pywlroots,qtile}: Several improvements (#473576)

This commit is contained in:
Yohann Boniface
2025-12-25 16:30:25 +00:00
committed by GitHub
4 changed files with 32 additions and 13 deletions
@@ -132,6 +132,7 @@ let
maintainers = with lib.maintainers; [
synthetica
wineee
doronbehar
];
pkgConfigModules = [
(
@@ -14,7 +14,6 @@
wayland,
pywayland,
xkbcommon,
xorg,
pytestCheckHook,
qtile,
}:
@@ -37,8 +36,6 @@ buildPythonPackage rec {
libinput
libxkbcommon
pixman
xorg.libxcb
xorg.xcbutilwm
udev
wayland
wlroots
@@ -65,6 +62,9 @@ buildPythonPackage rec {
description = "Python bindings to wlroots using cffi";
license = lib.licenses.ncsa;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ chvp ];
maintainers = with lib.maintainers; [
chvp
doronbehar
];
};
}
@@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
cairocffi,
dbus-fast,
aiohttp,
@@ -21,8 +22,6 @@
pulsectl-asyncio,
pygobject3,
pytz,
pywayland,
pywlroots,
pyxdg,
setuptools,
setuptools-scm,
@@ -33,7 +32,6 @@
xcbutilcursor,
xcbutilwm,
xcffib,
xkbcommon,
nixosTests,
extraPackages ? [ ],
}:
@@ -50,17 +48,37 @@ buildPythonPackage rec {
hash = "sha256-PPyI+IGvHBQusVmU3D26VjYjLaa9+94KUqNwbQSzeaI=";
};
patches = [
# The patch below makes upstream's build script search for wayland-scanner
# simply in $PATH, and not via `pkg-config`. This allows us to put
# wayland-scanner in nativeBuildInputs and keep using `strictDeps`. See:
#
# https://github.com/qtile/qtile/pull/5726
#
# Upstream has merged the PR directly - without creating a merge commit, so
# using a range is required.
(fetchpatch {
name = "qtile-PR5726-wayland-scanner-pkg-config.patch";
url = "https://github.com/qtile/qtile/compare/f0243abee5e6b94ef92b24e99d09037a4f40272b..553845bd17f38a6d1dee763a23c1b015df894794.patch";
hash = "sha256-hRArLC4nQMAbT//QhQeAUL1o7OCV0zvrlJztDavI0K0=";
})
];
build-system = [
setuptools
setuptools-scm
];
nativeBuildInputs = [
pkg-config
wayland-scanner
];
env = {
"QTILE_CAIRO_PATH" = "${lib.getDev cairo}/include/cairo";
"QTILE_PIXMAN_PATH" = "${lib.getDev pixman}/include/pixman-1";
"QTILE_LIBDRM_PATH" = "${lib.getDev libdrm}/include/libdrm";
"QTILE_WLROOTS_PATH" = "${lib.getDev wlroots}/include/wlroots-0.19";
"QTILE_WLROOTS_PATH" =
"${lib.getDev wlroots}/include/wlroots-${lib.versions.majorMinor wlroots.version}";
};
pypaBuildFlags = [
@@ -81,11 +99,8 @@ buildPythonPackage rec {
pulsectl-asyncio
pygobject3
pytz
pywayland
pywlroots
pyxdg
xcffib
xkbcommon
];
buildInputs = [
@@ -98,7 +113,6 @@ buildPythonPackage rec {
];
propagatedBuildInputs = [
wayland-scanner
wayland-protocols
cffi
xcffib
@@ -125,6 +139,7 @@ buildPythonPackage rec {
maintainers = with lib.maintainers; [
arjan-s
sigmanificient
doronbehar
];
};
}
@@ -35,6 +35,9 @@ buildPythonPackage rec {
homepage = "https://github.com/sde1000/python-xkbcommon";
description = "Python bindings for libxkbcommon using cffi";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ chvp ];
maintainers = with lib.maintainers; [
chvp
doronbehar
];
};
}