diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/xkbcommon/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/xkbcommon/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/xkbcommon/default.nix b/nixpkgs/pkgs/development/python-modules/xkbcommon/default.nix new file mode 100644 index 000000000000..580ad3921905 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/xkbcommon/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +, cffi +, pkg-config +, libxkbcommon +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "xkbcommon"; + version = "0.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "V5LMaX5TPhk9x4ZA4MGFzDhUiC6NKPo4uTbW6Q7mdVw="; + }; + + nativeBuildInputs = [ pkg-config ]; + propagatedNativeBuildInputs = [ cffi ]; + buildInputs = [ libxkbcommon ]; + propagatedBuildInputs = [ cffi ]; + checkInputs = [ pytestCheckHook ]; + + postBuild = '' + ${python.interpreter} xkbcommon/ffi_build.py + ''; + + 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 ]; + }; +} |