1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 linuxHeaders,
6 setuptools,
7}:
8
9buildPythonPackage rec {
10 pname = "evdev";
11 version = "1.9.2";
12 pyproject = true;
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-XTJ4iSzh+Sp01r+IjMhSXZ9or4Xb4zbJXRyH+49CMGk=";
17 };
18
19 patchPhase = ''
20 substituteInPlace setup.py \
21 --replace-fail /usr/include ${linuxHeaders}/include
22 '';
23
24 build-system = [ setuptools ];
25
26 buildInputs = [ linuxHeaders ];
27
28 doCheck = false;
29
30 pythonImportsCheck = [ "evdev" ];
31
32 meta = with lib; {
33 description = "Provides bindings to the generic input event interface in Linux";
34 homepage = "https://python-evdev.readthedocs.io/";
35 changelog = "https://github.com/gvalkov/python-evdev/blob/v${version}/docs/changelog.rst";
36 license = licenses.bsd3;
37 maintainers = [ ];
38 platforms = platforms.linux;
39 };
40}