2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cairocffi,
|
|
|
|
dbus-next,
|
|
|
|
glib,
|
|
|
|
iwlib,
|
|
|
|
libcst,
|
|
|
|
libdrm,
|
|
|
|
libinput,
|
|
|
|
libxkbcommon,
|
|
|
|
mpd2,
|
|
|
|
pango,
|
|
|
|
pixman,
|
|
|
|
pkg-config,
|
|
|
|
psutil,
|
|
|
|
pulsectl-asyncio,
|
|
|
|
pygobject3,
|
|
|
|
pytz,
|
|
|
|
pywayland,
|
|
|
|
pywlroots,
|
|
|
|
pyxdg,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
wayland,
|
|
|
|
wlroots,
|
|
|
|
xcbutilcursor,
|
|
|
|
xcbutilwm,
|
|
|
|
xcffib,
|
|
|
|
xkbcommon,
|
|
|
|
nixosTests,
|
2024-06-20 14:57:18 +00:00
|
|
|
extraPackages ? [ ],
|
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";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.26.0";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qtile";
|
|
|
|
repo = "qtile";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-htgrfGBGRlJSm88mmwW92ikXR/M1lr0OTom16TIvdpo=";
|
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 \
|
2024-06-05 15:53:02 +00:00
|
|
|
--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
|
2023-03-27 19:17:25 +00:00
|
|
|
substituteInPlace libqtile/backend/x11/xcursors.py \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-fail 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 \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-fail /usr/include/pixman-1 ${lib.getDev pixman}/include \
|
|
|
|
--replace-fail /usr/include/libdrm ${lib.getDev libdrm}/include/libdrm
|
2023-03-27 19:17:25 +00:00
|
|
|
'';
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
2023-05-24 13:37:59 +00:00
|
|
|
setuptools
|
2023-10-09 19:29:22 +00:00
|
|
|
setuptools-scm
|
2024-05-15 15:35:15 +00:00
|
|
|
pkg-config
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
dependencies = extraPackages ++ [
|
2023-03-27 19:17:25 +00:00
|
|
|
(cairocffi.override { withXcffib = true; })
|
|
|
|
dbus-next
|
2023-10-09 19:29:22 +00:00
|
|
|
iwlib
|
2024-06-05 15:53:02 +00:00
|
|
|
libcst
|
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
|
2024-06-05 15:53:02 +00:00
|
|
|
pytz
|
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
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
doCheck = false;
|
|
|
|
passthru = {
|
|
|
|
tests.qtile = nixosTests.qtile;
|
|
|
|
providedSessions = [ "qtile" ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
postInstall = ''
|
|
|
|
install resources/qtile.desktop -Dt $out/share/xsessions
|
|
|
|
install resources/qtile-wayland.desktop -Dt $out/share/wayland-sessions
|
|
|
|
'';
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://www.qtile.org/";
|
|
|
|
license = licenses.mit;
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Small, flexible, scriptable tiling window manager written in Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "qtile";
|
2023-03-27 19:17:25 +00:00
|
|
|
platforms = platforms.linux;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
arjan-s
|
|
|
|
sigmanificient
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-03-27 19:17:25 +00:00
|
|
|
}
|