Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pynput / default.nix
blob88c46532d997ccfd55ebac4ea83473441aa5f0b4
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
6 # build-system
7 , setuptools
8 , setuptools-lint
9 , sphinx
11 # dependencies
12 , xlib
13 , evdev
14 , darwin
15 , six
17  # tests
18 , unittestCheckHook
19  }:
21 buildPythonPackage rec {
22   pname = "pynput";
23   version = "1.7.6";
24   format = "pyproject";
26   src = fetchFromGitHub {
27     owner = "moses-palmer";
28     repo = "pynput";
29     rev = "refs/tags/v${version}";
30     hash = "sha256-gRq4LS9NvPL98N0Jk09Z0GfoHS09o3zM284BEWS+NW4=";
31   };
33   postPatch = ''
34     substituteInPlace setup.py \
35       --replace "'sphinx >=1.3.1'" ""
36   '';
38   nativeBuildInputs = [
39     setuptools
40     setuptools-lint
41     sphinx
42   ];
44   propagatedBuildInputs = [
45     six
46   ] ++ lib.optionals stdenv.isLinux [
47     evdev
48     xlib
49   ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
50     ApplicationServices
51     Quartz
52   ]);
54   doCheck = false; # requires running X server
56   nativeCheckInputs = [
57     unittestCheckHook
58   ];
60   meta = with lib; {
61     broken = stdenv.isDarwin;
62     description = "A library to control and monitor input devices";
63     homepage = "https://github.com/moses-palmer/pynput";
64     license = licenses.lgpl3;
65     maintainers = with maintainers; [ nickhu ];
66   };