Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / dogtail / default.nix
blob4981440c7ccd585c8fd015d8fa4fc5cd439ec4cd
1 { lib
2 , buildPythonPackage
3 , python
4 , pygobject3
5 , pyatspi
6 , pycairo
7 , at-spi2-core
8 , gobject-introspection
9 , gtk3
10 , gsettings-desktop-schemas
11 , fetchurl
12 , dbus
13 , xvfb_run
14 , wrapGAppsHook
15 # , fetchPypi
18 buildPythonPackage {
19   pname = "dogtail";
20   version = "0.9.11";
22   # https://gitlab.com/dogtail/dogtail/issues/1
23   # src = fetchPypi {
24   #   inherit pname version;
25   #   sha256 = "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x";
26   # };
27   src = fetchurl {
28     url = "https://gitlab.com/dogtail/dogtail/raw/released/dogtail-0.9.10.tar.gz";
29     sha256 = "EGyxYopupfXPYtTL9mm9ujZorvh8AGaNXVKBPWsGy3c=";
30   };
32   patches = [
33     ./nix-support.patch
34   ];
36   nativeBuildInputs = [ gobject-introspection dbus xvfb_run wrapGAppsHook ]; # for setup hooks
37   propagatedBuildInputs = [ at-spi2-core gtk3 pygobject3 pyatspi pycairo ];
38   strictDeps = false; # issue 56943
40   checkPhase = ''
41     runHook preCheck
42     export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:$XDG_DATA_DIRS
43     # export NO_AT_BRIDGE=1
44     gsettings set org.gnome.desktop.interface toolkit-accessibility true
45     xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
46       --config-file=${dbus.daemon}/share/dbus-1/session.conf \
47       ${python.interpreter} nix_run_setup test
48     runHook postCheck
49   '';
51   # TODO: Tests require accessibility
52   doCheck = false;
54   meta = {
55     description = "GUI test tool and automation framework that uses Accessibility technologies to communicate with desktop applications";
56     homepage = "https://gitlab.com/dogtail/dogtail";
57     license = lib.licenses.gpl2Only;
58     maintainers = with lib.maintainers; [ jtojnar ];
59   };