1{ lib 2, buildPythonPackage 3, fetchPypi 4, python 5, cffi 6, pkg-config 7, wayland 8, pytestCheckHook 9}: 10 11buildPythonPackage rec { 12 pname = "pywayland"; 13 version = "0.4.17"; 14 15 src = fetchPypi { 16 inherit pname version; 17 hash = "sha256-9/0ZAmOML3oVrAfzGj72iV08FgyiYBSByoKyxhojxlc="; 18 }; 19 20 nativeBuildInputs = [ pkg-config ]; 21 propagatedNativeBuildInputs = [ cffi ]; 22 buildInputs = [ wayland ]; 23 propagatedBuildInputs = [ cffi ]; 24 nativeCheckInputs = [ pytestCheckHook ]; 25 26 postBuild = '' 27 ${python.pythonOnBuildForHost.interpreter} pywayland/ffi_build.py 28 ''; 29 30 # Tests need this to create sockets 31 preCheck = '' 32 export XDG_RUNTIME_DIR="$PWD" 33 ''; 34 35 pythonImportsCheck = [ "pywayland" ]; 36 37 meta = with lib; { 38 homepage = "https://github.com/flacjacket/pywayland"; 39 description = "Python bindings to wayland using cffi"; 40 license = licenses.ncsa; 41 maintainers = with maintainers; [ chvp ]; 42 }; 43}