Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pyautogui / default.nix
blob04cd0513dd2b330d88be8f2331b77dbe60f1e242
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , mouseinfo
5 , pygetwindow
6 , pymsgbox
7 , pyperclip
8 , pyscreeze
9 , pytweening
10 , tkinter
11 , xlib
12 , xvfb-run
13 , scrot
15 buildPythonPackage rec {
16   pname = "pyautogui";
17   version = "0.9.53";
18   format = "setuptools";
20   src = fetchFromGitHub {
21     owner = "asweigart";
22     repo = "pyautogui";
23     rev = "5e4acb870f2e7ce0ea1927cc5188bc2f5ab7bbbc";
24     hash = "sha256-R9tcTqxUaqw63FLOGFRaO/Oz6kD7V6MPHdQ8A29NdXw=";
25   };
27   nativeCheckInputs = [ xvfb-run scrot ];
28   checkPhase = ''
29     xvfb-run python -c 'import pyautogui'
30     # The tests depend on some specific things that xvfb cant provide, like keyboard and mouse
31     # xvfb-run python -m unittest tests.test_pyautogui
32   '';
34   patches = [
35     # https://github.com/asweigart/pyautogui/issues/598
36     ./fix-locateOnWindow-and-xlib.patch
37   ];
39   propagatedBuildInputs = [
40     mouseinfo
41     pygetwindow
42     pymsgbox
43     xlib
44     tkinter
45     pyperclip
46     pyscreeze
47     pytweening
48   ];
50   meta = with lib; {
51     description = "PyAutoGUI lets Python control the mouse and keyboard, and other GUI automation tasks.";
52     homepage = "https://github.com/asweigart/pyautogui";
53     license = licenses.bsd3;
54     maintainers = with maintainers; [ lucasew ];
55   };