2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, cffi
|
|
|
|
, pkg-config
|
|
|
|
, wayland
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pywayland";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "0.4.15";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-vz7Sjd8KT7UgOBI5AN5q6CS7jl+WL87w91cgm0bXRGw=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
|
|
|
buildInputs = [ wayland ];
|
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
${python.interpreter} pywayland/ffi_build.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Tests need this to create sockets
|
|
|
|
preCheck = ''
|
|
|
|
export XDG_RUNTIME_DIR="$PWD"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pywayland" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/flacjacket/pywayland";
|
|
|
|
description = "Python bindings to wayland using cffi";
|
|
|
|
license = licenses.ncsa;
|
|
|
|
maintainers = with maintainers; [ chvp ];
|
|
|
|
};
|
|
|
|
}
|