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