2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, cffi
|
|
|
|
, pkg-config
|
|
|
|
, libxkbcommon
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xkbcommon";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-NTEafcAU/PU1/2n3pb3m8dbZptI9j9nnmVG4iFqHHe8=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
|
|
|
buildInputs = [ libxkbcommon ];
|
|
|
|
propagatedBuildInputs = [ cffi ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} xkbcommon/ffi_build.py
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "xkbcommon" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/sde1000/python-xkbcommon";
|
|
|
|
description = "Python bindings for libxkbcommon using cffi";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ chvp ];
|
|
|
|
};
|
|
|
|
}
|