Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / evdev / default.nix
blob659a2314d6dd055ce72f218c46d28c11e1b972b3
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , linuxHeaders
5 , pythonOlder
6 }:
8 buildPythonPackage rec {
9   pname = "evdev";
10   version = "1.6.1";
11   format = "setuptools";
13   disabled = pythonOlder "3.7";
15   src = fetchPypi {
16     inherit pname version;
17     hash = "sha256-KZ24YozHOyN/wcxX08KUj6oHVuKli2GUtb+B3CCB8eM=";
18   };
20   buildInputs = [
21     linuxHeaders
22   ];
24   patchPhase = ''
25     substituteInPlace setup.py \
26       --replace /usr/include/linux ${linuxHeaders}/include/linux
27   '';
29   doCheck = false;
31   pythonImportsCheck = [
32     "evdev"
33   ];
35   meta = with lib; {
36     description = "Provides bindings to the generic input event interface in Linux";
37     homepage = "https://python-evdev.readthedocs.io/";
38     changelog = "https://github.com/gvalkov/python-evdev/blob/v${version}/docs/changelog.rst";
39     license = licenses.bsd3;
40     maintainers = with maintainers; [ goibhniu ];
41     platforms = platforms.linux;
42   };