2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, cffi
|
|
|
|
, pkg-config
|
|
|
|
, libxkbcommon
|
|
|
|
, libinput
|
|
|
|
, pixman
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
, udev
|
2023-03-24 00:07:29 +00:00
|
|
|
, wlroots
|
2021-12-06 16:07:01 +00:00
|
|
|
, wayland
|
|
|
|
, pywayland
|
|
|
|
, xkbcommon
|
2022-01-26 04:04:25 +00:00
|
|
|
, xorg
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
2023-03-24 00:07:29 +00:00
|
|
|
, qtile
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pywlroots";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.16.6";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-ITf1uALQ0ZJMeZ4wbC7VqEL9LdoK67vqRpXD6LTWjUE=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
2023-10-09 19:29:22 +00:00
|
|
|
buildInputs = [ libinput libxkbcommon pixman xorg.libxcb xorg.xcbutilwm udev wayland wlroots ];
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [ cffi pywayland xkbcommon ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
2023-03-04 12:14:45 +00:00
|
|
|
${python.pythonForBuild.interpreter} wlroots/ffi_build.py
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "wlroots" ];
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
passthru.tests = { inherit qtile; };
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/flacjacket/pywlroots";
|
|
|
|
description = "Python bindings to wlroots using cffi";
|
|
|
|
license = licenses.ncsa;
|
2022-01-26 04:04:25 +00:00
|
|
|
platforms = platforms.linux;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ chvp ];
|
|
|
|
};
|
|
|
|
}
|