silx: 2.1.1 -> 2.1.2 (#361612)
[NixPkgs.git] / pkgs / development / python-modules / pynput / default.nix
blob6d73c35e5ba626eaba8371963412fb72a7dbfbdb
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
7   # build-system
8   setuptools,
9   setuptools-lint,
10   sphinx,
12   # dependencies
13   xlib,
14   evdev,
15   darwin,
16   six,
18   # tests
19   unittestCheckHook,
22 buildPythonPackage rec {
23   pname = "pynput";
24   version = "1.7.6";
25   format = "pyproject";
27   src = fetchFromGitHub {
28     owner = "moses-palmer";
29     repo = "pynput";
30     rev = "refs/tags/v${version}";
31     hash = "sha256-gRq4LS9NvPL98N0Jk09Z0GfoHS09o3zM284BEWS+NW4=";
32   };
34   postPatch = ''
35     substituteInPlace setup.py \
36       --replace "'sphinx >=1.3.1'" ""
37   '';
39   nativeBuildInputs = [
40     setuptools
41     setuptools-lint
42     sphinx
43   ];
45   propagatedBuildInputs =
46     [ six ]
47     ++ lib.optionals stdenv.hostPlatform.isLinux [
48       evdev
49       xlib
50     ]
51     ++ lib.optionals stdenv.hostPlatform.isDarwin (
52       with darwin.apple_sdk.frameworks;
53       [
54         ApplicationServices
55         Quartz
56       ]
57     );
59   doCheck = false; # requires running X server
61   nativeCheckInputs = [ unittestCheckHook ];
63   meta = with lib; {
64     broken = stdenv.hostPlatform.isDarwin;
65     description = "Library to control and monitor input devices";
66     homepage = "https://github.com/moses-palmer/pynput";
67     license = licenses.lgpl3;
68     maintainers = with maintainers; [ nickhu ];
69   };