1{
2 lib,
3 buildPythonPackage,
4 isPy27,
5 fetchPypi,
6 substituteAll,
7 pkgs,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "libevdev";
13 version = "0.11";
14 format = "setuptools";
15 disabled = isPy27;
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-6coAak3ySIpgvZp0ABHulI2BkEviNk8BflYBaVCPVg8=";
20 };
21
22 patches = [
23 (substituteAll {
24 src = ./fix-paths.patch;
25 libevdev = lib.getLib pkgs.libevdev;
26 })
27 ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 meta = with lib; {
32 description = "Python wrapper around the libevdev C library";
33 homepage = "https://gitlab.freedesktop.org/libevdev/python-libevdev";
34 license = licenses.mit;
35 maintainers = with maintainers; [ nickhu ];
36 };
37}