2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, cffi
|
|
|
|
, pkg-config
|
|
|
|
, libxkbcommon
|
|
|
|
, libinput
|
|
|
|
, pixman
|
|
|
|
, udev
|
|
|
|
, wlroots
|
|
|
|
, wayland
|
|
|
|
, pywayland
|
|
|
|
, xkbcommon
|
2022-01-26 04:04:25 +00:00
|
|
|
, xorg
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pywlroots";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.15.8";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "5oKeiNRO/5/6gWHPgatn0sHRtPL2B2Fa7S1A7LWr0qM=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
# The XWayland detection uses some hard-coded FHS paths. Since we
|
|
|
|
# know wlroots was built with xwayland support, replace its
|
|
|
|
# detection with `return True`.
|
|
|
|
patches = [ ./xwayland.patch ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
2022-01-26 04:04:25 +00:00
|
|
|
buildInputs = [ libinput libxkbcommon pixman xorg.libxcb udev wayland wlroots ];
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [ cffi pywayland xkbcommon ];
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
${python.interpreter} wlroots/ffi_build.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "wlroots" ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|