nixpkgs/pkgs/development/python-modules/pyautogui/default.nix
adisbladis 02dab4ab5c python3.pkgs.*: Explicitly pass buildPythonPackage format parameter
Long term we should move everything over to `pyproject = true`, but in
the mean time we can work towards deprecating the implicit `format` paremeter.

cc https://github.com/NixOS/nixpkgs/issues/253154
cc @mweinelt @figsoda
2023-12-07 17:46:49 +01:00

56 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, mouseinfo
, pygetwindow
, pymsgbox
, pyperclip
, pyscreeze
, pytweening
, tkinter
, xlib
, xvfb-run
, scrot
}:
buildPythonPackage rec {
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 = 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 ];
};
}