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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
mouseinfo,
pygetwindow,
pymsgbox,
pyperclip,
pyscreeze,
pytweening,
tkinter,
xlib,
xvfb-run,
scrot,
}:
buildPythonPackage {
pname = "pyautogui";
version = "0.9.53";
format = "setuptools";
src = fetchFromGitHub {
owner = "asweigart";
repo = "pyautogui";
rev = "5e4acb870f2e7ce0ea1927cc5188bc2f5ab7bbbc";
hash = "sha256-R9tcTqxUaqw63FLOGFRaO/Oz6kD7V6MPHdQ8A29NdXw=";
};
nativeCheckInputs = [
xvfb-run
scrot
];
checkPhase = ''
xvfb-run python -c 'import pyautogui'
# The tests depend on some specific things that xvfb cant provide, like keyboard and mouse
# xvfb-run python -m unittest tests.test_pyautogui
'';
patches = [
# https://github.com/asweigart/pyautogui/issues/598
./fix-locateOnWindow-and-xlib.patch
];
propagatedBuildInputs = [
mouseinfo
pygetwindow
pymsgbox
xlib
tkinter
pyperclip
pyscreeze
pytweening
];
meta = {
description = "PyAutoGUI lets Python control the mouse and keyboard, and other GUI automation tasks";
homepage = "https://github.com/asweigart/pyautogui";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ lucasew ];
};
}
|