2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, cffi
|
|
|
|
, pkg-config
|
|
|
|
, wayland
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pywayland";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "0.4.16";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-qqcMhwsKs2UhX45xUF9zaDxO0VsfNjhDOx3HNE/ltd0=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
|
|
|
buildInputs = [ wayland ];
|
|
|
|
propagatedBuildInputs = [ cffi ];
|
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} pywayland/ffi_build.py
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# 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 ];
|
|
|
|
};
|
|
|
|
}
|