1{ lib, buildPythonPackage, fetchPypi, linuxHeaders }:
2
3buildPythonPackage rec {
4 pname = "evdev";
5 version = "1.4.0";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "8782740eb1a86b187334c07feb5127d3faa0b236e113206dfe3ae8f77fb1aaf1";
10 };
11
12 buildInputs = [ linuxHeaders ];
13
14 patchPhase = ''
15 substituteInPlace setup.py --replace /usr/include/linux ${linuxHeaders}/include/linux
16 '';
17
18 doCheck = false;
19
20 meta = with lib; {
21 description = "Provides bindings to the generic input event interface in Linux";
22 homepage = "https://pythonhosted.org/evdev";
23 license = licenses.bsd3;
24 maintainers = with maintainers; [ goibhniu ];
25 platforms = platforms.linux;
26 };
27}