about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/evdev/default.nix
blob: 659a2314d6dd055ce72f218c46d28c11e1b972b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ lib
, buildPythonPackage
, fetchPypi
, linuxHeaders
, pythonOlder
}:

buildPythonPackage rec {
  pname = "evdev";
  version = "1.6.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-KZ24YozHOyN/wcxX08KUj6oHVuKli2GUtb+B3CCB8eM=";
  };

  buildInputs = [
    linuxHeaders
  ];

  patchPhase = ''
    substituteInPlace setup.py \
      --replace /usr/include/linux ${linuxHeaders}/include/linux
  '';

  doCheck = false;

  pythonImportsCheck = [
    "evdev"
  ];

  meta = with lib; {
    description = "Provides bindings to the generic input event interface in Linux";
    homepage = "https://python-evdev.readthedocs.io/";
    changelog = "https://github.com/gvalkov/python-evdev/blob/v${version}/docs/changelog.rst";
    license = licenses.bsd3;
    maintainers = with maintainers; [ goibhniu ];
    platforms = platforms.linux;
  };
}