1{ lib
2, buildPythonPackage
3, fetchPypi
4, python
5, cffi
6, pkg-config
7, libxkbcommon
8, libinput
9, pixman
10, pythonOlder
11, udev
12, wlroots
13, wayland
14, pywayland
15, xkbcommon
16, xorg
17, pytestCheckHook
18}:
19
20buildPythonPackage rec {
21 pname = "pywlroots";
22 version = "0.15.24";
23 format = "setuptools";
24
25 disabled = pythonOlder "3.7";
26
27 src = fetchPypi {
28 inherit pname version;
29 sha256 = "sha256-TvYhxiAbK+mpcEE9y79WH96dzeDnvI0xPaUxSYQqyHE=";
30 };
31
32 nativeBuildInputs = [ pkg-config ];
33 propagatedNativeBuildInputs = [ cffi ];
34 buildInputs = [ libinput libxkbcommon pixman xorg.libxcb udev wayland wlroots ];
35 propagatedBuildInputs = [ cffi pywayland xkbcommon ];
36 checkInputs = [ pytestCheckHook ];
37
38 postBuild = ''
39 ${python.interpreter} wlroots/ffi_build.py
40 '';
41
42 pythonImportsCheck = [ "wlroots" ];
43
44 meta = with lib; {
45 homepage = "https://github.com/flacjacket/pywlroots";
46 description = "Python bindings to wlroots using cffi";
47 license = licenses.ncsa;
48 platforms = platforms.linux;
49 maintainers = with maintainers; [ chvp ];
50 };
51}