2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
mouseinfo,
|
|
|
|
pygetwindow,
|
|
|
|
pymsgbox,
|
|
|
|
pyperclip,
|
|
|
|
pyscreeze,
|
|
|
|
pytweening,
|
|
|
|
tkinter,
|
|
|
|
xlib,
|
|
|
|
xvfb-run,
|
|
|
|
scrot,
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyautogui";
|
|
|
|
version = "0.9.53";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "asweigart";
|
|
|
|
repo = "pyautogui";
|
|
|
|
rev = "5e4acb870f2e7ce0ea1927cc5188bc2f5ab7bbbc";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-R9tcTqxUaqw63FLOGFRaO/Oz6kD7V6MPHdQ8A29NdXw=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
xvfb-run
|
|
|
|
scrot
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
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 = with lib; {
|
|
|
|
description = "PyAutoGUI lets Python control the mouse and keyboard, and other GUI automation tasks.";
|
|
|
|
homepage = "https://github.com/asweigart/pyautogui";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ lucasew ];
|
|
|
|
};
|
|
|
|
}
|