2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
2023-05-24 13:37:59 +00:00
|
|
|
, buildPythonPackage
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, cairocffi
|
|
|
|
, dbus-next
|
|
|
|
, dbus-python
|
2022-03-30 09:31:56 +00:00
|
|
|
, glib
|
2023-10-09 19:29:22 +00:00
|
|
|
, iwlib
|
|
|
|
, libdrm
|
2022-03-30 09:31:56 +00:00
|
|
|
, libinput
|
|
|
|
, libxkbcommon
|
2023-05-24 13:37:59 +00:00
|
|
|
, mpd2
|
|
|
|
, pango
|
2023-10-09 19:29:22 +00:00
|
|
|
, pixman
|
2023-05-24 13:37:59 +00:00
|
|
|
, pkg-config
|
|
|
|
, psutil
|
2023-10-09 19:29:22 +00:00
|
|
|
, pulsectl-asyncio
|
2023-05-24 13:37:59 +00:00
|
|
|
, pygobject3
|
|
|
|
, python-dateutil
|
|
|
|
, pywayland
|
|
|
|
, pywlroots
|
|
|
|
, pyxdg
|
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
2022-03-30 09:31:56 +00:00
|
|
|
, wayland
|
|
|
|
, wlroots
|
|
|
|
, xcbutilcursor
|
2023-10-09 19:29:22 +00:00
|
|
|
, xcbutilwm
|
2023-05-24 13:37:59 +00:00
|
|
|
, xcffib
|
|
|
|
, xkbcommon
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
buildPythonPackage rec {
|
2023-03-27 19:17:25 +00:00
|
|
|
pname = "qtile";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.23.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qtile";
|
|
|
|
repo = "qtile";
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-WxnpkKqYGGEsFTt/1iCSiCzdESJP6HFJ6BztaMsMbYo=";
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
patches = [
|
|
|
|
./fix-restart.patch # https://github.com/NixOS/nixpkgs/issues/139568
|
|
|
|
];
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace libqtile/pangocffi.py \
|
|
|
|
--replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \
|
|
|
|
--replace libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0 \
|
|
|
|
--replace libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0
|
|
|
|
substituteInPlace libqtile/backend/x11/xcursors.py \
|
|
|
|
--replace libxcb-cursor.so.0 ${xcbutilcursor.out}/lib/libxcb-cursor.so.0
|
2023-10-09 19:29:22 +00:00
|
|
|
substituteInPlace libqtile/backend/wayland/cffi/build.py \
|
|
|
|
--replace /usr/include/pixman-1 ${lib.getDev pixman}/include \
|
|
|
|
--replace /usr/include/libdrm ${lib.getDev libdrm}/include/libdrm
|
2023-03-27 19:17:25 +00:00
|
|
|
'';
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2023-05-24 13:37:59 +00:00
|
|
|
setuptools
|
2023-10-09 19:29:22 +00:00
|
|
|
setuptools-scm
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-03-27 19:17:25 +00:00
|
|
|
(cairocffi.override { withXcffib = true; })
|
|
|
|
dbus-next
|
2023-10-09 19:29:22 +00:00
|
|
|
dbus-python
|
|
|
|
iwlib
|
2023-03-27 19:17:25 +00:00
|
|
|
mpd2
|
|
|
|
psutil
|
2023-10-09 19:29:22 +00:00
|
|
|
pulsectl-asyncio
|
2023-03-27 19:17:25 +00:00
|
|
|
pygobject3
|
2023-10-09 19:29:22 +00:00
|
|
|
python-dateutil
|
2023-03-27 19:17:25 +00:00
|
|
|
pywayland
|
|
|
|
pywlroots
|
2023-10-09 19:29:22 +00:00
|
|
|
pyxdg
|
|
|
|
xcffib
|
2023-03-27 19:17:25 +00:00
|
|
|
xkbcommon
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
buildInputs = [
|
|
|
|
libinput
|
2023-10-09 19:29:22 +00:00
|
|
|
libxkbcommon
|
2023-03-27 19:17:25 +00:00
|
|
|
wayland
|
|
|
|
wlroots
|
2023-10-09 19:29:22 +00:00
|
|
|
xcbutilwm
|
2023-03-27 19:17:25 +00:00
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://www.qtile.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
description = "A small, flexible, scriptable tiling window manager written in Python";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ kamilchm arjan-s ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-03-27 19:17:25 +00:00
|
|
|
}
|