about summary refs log tree commit diff
path: root/pkgs/development/python-modules/keyboard/default.nix
blob: 20b3453dab0d1b51cd78a3b33e23eefe7889b4f8 (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
{ lib
, buildPythonPackage
, fetchFromGitHub }:

buildPythonPackage rec {
  pname = "keyboard";
  version = "0.13.5";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "boppreh";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-U4GWhPp28azBE3Jn9xpLxudOKx0PjnYO77EM2HsJ9lM=";
  };

  pythonImportsCheck = [ "keyboard" ];

  # Specific OS tests are being run for other OS, like
  # winmouse on Linux, which provides the following error:
  # AttributeError: module 'ctypes' has no attribute 'WinDLL'
  doCheck = false;

  meta = with lib; {
    description = "Hook and simulate keyboard events on Windows and Linux";
    homepage = "https://github.com/boppreh/keyboard";
    license = licenses.mit;
    maintainers = with maintainers; [ wolfangaukang ];
    platforms = platforms.linux;
  };
}