1{ lib 2, buildPythonPackage 3, fetchPypi 4, python 5, cffi 6, pkg-config 7, libxkbcommon 8, pytestCheckHook 9}: 10 11buildPythonPackage rec { 12 pname = "xkbcommon"; 13 version = "0.4"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "V5LMaX5TPhk9x4ZA4MGFzDhUiC6NKPo4uTbW6Q7mdVw="; 18 }; 19 20 nativeBuildInputs = [ pkg-config ]; 21 propagatedNativeBuildInputs = [ cffi ]; 22 buildInputs = [ libxkbcommon ]; 23 propagatedBuildInputs = [ cffi ]; 24 checkInputs = [ pytestCheckHook ]; 25 26 postBuild = '' 27 ${python.interpreter} xkbcommon/ffi_build.py 28 ''; 29 30 pythonImportsCheck = [ "xkbcommon" ]; 31 32 meta = with lib; { 33 homepage = "https://github.com/sde1000/python-xkbcommon"; 34 description = "Python bindings for libxkbcommon using cffi"; 35 license = licenses.mit; 36 maintainers = with maintainers; [ chvp ]; 37 }; 38}