diff --git a/pkgs/development/python-modules/qtile/default.nix b/pkgs/development/python-modules/qtile/default.nix index c290e207a946..997b2f3ad8f6 100644 --- a/pkgs/development/python-modules/qtile/default.nix +++ b/pkgs/development/python-modules/qtile/default.nix @@ -4,6 +4,9 @@ fetchFromGitHub, cairocffi, dbus-fast, + aiohttp, + cairo, + cffi, glib, iwlib, libcst, @@ -24,6 +27,8 @@ setuptools, setuptools-scm, wayland, + wayland-protocols, + wayland-scanner, wlroots, xcbutilcursor, xcbutilwm, @@ -35,38 +40,37 @@ buildPythonPackage rec { pname = "qtile"; - version = "0.33.0"; + version = "0.34.0"; pyproject = true; src = fetchFromGitHub { owner = "qtile"; repo = "qtile"; tag = "v${version}"; - hash = "sha256-npteZR48xN3G5gDsHt8c67zzc8Tom1YxnxbnDuKZHVg="; + hash = "sha256-o92N8AQQfNQP8sX4LCnlq0Ppe9OA0+goCv+sOxMFYjo="; }; - patches = [ - ./fix-restart.patch # https://github.com/NixOS/nixpkgs/issues/139568 - ]; - - postPatch = '' - substituteInPlace libqtile/pangocffi.py \ - --replace-fail libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \ - --replace-fail libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0 \ - --replace-fail libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0 - substituteInPlace libqtile/backend/x11/xcursors.py \ - --replace-fail libxcb-cursor.so.0 ${xcbutilcursor.out}/lib/libxcb-cursor.so.0 - substituteInPlace libqtile/backend/wayland/cffi/build.py \ - --replace-fail /usr/include/pixman-1 ${lib.getDev pixman}/include \ - --replace-fail /usr/include/libdrm ${lib.getDev libdrm}/include/libdrm - ''; - build-system = [ setuptools setuptools-scm pkg-config ]; + 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"; + }; + + pypaBuildFlags = [ + "--config-setting=backend=wayland" + "--config-setting=GOBJECT=${lib.getLib glib}/lib/libgobject-2.0.so" + "--config-setting=PANGO=${lib.getLib pango}/lib/libpango-1.0.so" + "--config-setting=PANGOCAIRO=${lib.getLib pango}/lib/libpangocairo-1.0.so" + "--config-setting=XCBCURSOR=${lib.getLib xcbutilcursor}/lib/libxcb-cursor.so" + ]; + dependencies = extraPackages ++ [ (cairocffi.override { withXcffib = true; }) dbus-fast @@ -85,6 +89,7 @@ buildPythonPackage rec { ]; buildInputs = [ + cairo libinput libxkbcommon wayland @@ -92,6 +97,14 @@ buildPythonPackage rec { xcbutilwm ]; + propagatedBuildInputs = [ + wayland-scanner + wayland-protocols + cffi + xcffib + aiohttp + ]; + doCheck = false; passthru = { tests.qtile = nixosTests.qtile; diff --git a/pkgs/development/python-modules/qtile/fix-restart.patch b/pkgs/development/python-modules/qtile/fix-restart.patch deleted file mode 100644 index eca4f0866342..000000000000 --- a/pkgs/development/python-modules/qtile/fix-restart.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/libqtile/core/lifecycle.py b/libqtile/core/lifecycle.py -index 0d4d119d..c37d1799 100644 ---- a/libqtile/core/lifecycle.py -+++ b/libqtile/core/lifecycle.py -@@ -25,7 +25,7 @@ class LifeCycle: - - def _atexit(self) -> None: - if self.behavior is Behavior.RESTART: -- argv = [sys.executable] + sys.argv -+ argv = sys.argv - if "--no-spawn" not in argv: - argv.append("--no-spawn") - argv = [s for s in argv if not s.startswith("--with-state")] -@@ -33,7 +33,7 @@ class LifeCycle: - argv.append("--with-state=" + self.state_file) - logger.warning("Restarting Qtile with os.execv(...)") - # No other code will execute after the following line does -- os.execv(sys.executable, argv) -+ os.execv(sys.argv[0], argv) - elif self.behavior is Behavior.TERMINATE: - logger.warning("Qtile will now terminate") - elif self.behavior is Behavior.NONE: diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2e47ec76190a..b60675e0fa0e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15839,7 +15839,7 @@ self: super: with self; { qtconsole = callPackage ../development/python-modules/qtconsole { }; - qtile = callPackage ../development/python-modules/qtile { wlroots = pkgs.wlroots_0_17; }; + qtile = callPackage ../development/python-modules/qtile { wlroots = pkgs.wlroots_0_19; }; qtile-bonsai = callPackage ../development/python-modules/qtile-bonsai { };