1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cairocffi,
6 cffi,
7 psutil,
8 xcffib,
9 uv-build,
10 pyside6,
11 pyvirtualdisplay,
12 pytestCheckHook,
13 qtile,
14}:
15buildPythonPackage rec {
16 pname = "qtile-bonsai";
17 version = "0.6.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "aravinda0";
22 repo = "qtile-bonsai";
23 tag = "v${version}";
24 hash = "sha256-JCElI4Ymr99p9dj++N9lyTFNmikntBwwImYREXFsUo0=";
25 };
26
27 build-system = [
28 uv-build
29 ];
30
31 dependencies = [
32 psutil
33 ];
34
35 nativeCheckInputs = [
36 pyside6
37 pyvirtualdisplay
38 (cairocffi.override { withXcffib = true; })
39 cffi
40 xcffib
41 qtile
42 pytestCheckHook
43 ];
44
45 postPatch = ''
46 substituteInPlace pyproject.toml \
47 --replace 'uv_build>=0.8.13,<0.9.0' 'uv_build'
48 '';
49
50 preCheck = ''
51 export HOME=$(mktemp -d)
52 '';
53
54 disabledTestPaths = [
55 # Needs a running DBUS
56 "tests/integration/test_layout.py"
57 "tests/integration/test_widget.py"
58 ];
59
60 pythonImportsCheck = [ "qtile_bonsai" ];
61
62 meta = {
63 changelog = "https://github.com/aravinda0/qtile-bonsai/releases/tag/${version}";
64 homepage = "https://github.com/aravinda0/qtile-bonsai";
65 description = "Flexible layout for the qtile tiling window manager";
66 license = lib.licenses.mit;
67 maintainers = with lib.maintainers; [
68 gurjaka
69 sigmanificient
70 ];
71 };
72}