python312Packages.dash-renderer: remove (#369714)
[NixPkgs.git] / pkgs / development / python-modules / dogtail / default.nix
blob04067083b56aa0b2e6780b82c51b080472cddb40
2   lib,
3   buildPythonPackage,
4   python,
5   pygobject3,
6   pyatspi,
7   pycairo,
8   at-spi2-core,
9   gobject-introspection,
10   gtk3,
11   gsettings-desktop-schemas,
12   fetchurl,
13   dbus,
14   xvfb-run,
15   wrapGAppsHook3,
16 # , fetchPypi
19 buildPythonPackage {
20   pname = "dogtail";
21   version = "0.9.11";
22   format = "setuptools";
24   outputs = [
25     "out"
26     "dev"
27   ];
29   # https://gitlab.com/dogtail/dogtail/issues/1
30   # src = fetchPypi {
31   #   inherit pname version;
32   #   sha256 = "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x";
33   # };
34   src = fetchurl {
35     url = "https://gitlab.com/dogtail/dogtail/raw/released/dogtail-0.9.10.tar.gz";
36     sha256 = "EGyxYopupfXPYtTL9mm9ujZorvh8AGaNXVKBPWsGy3c=";
37   };
39   patches = [ ./nix-support.patch ];
41   nativeBuildInputs = [
42     gobject-introspection
43     dbus
44     xvfb-run
45     wrapGAppsHook3
46   ]; # for setup hooks
47   propagatedBuildInputs = [
48     at-spi2-core
49     gtk3
50     pygobject3
51     pyatspi
52     pycairo
53   ];
55   checkPhase = ''
56     runHook preCheck
57     export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:$XDG_DATA_DIRS
58     # export NO_AT_BRIDGE=1
59     gsettings set org.gnome.desktop.interface toolkit-accessibility true
60     xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
61       --config-file=${dbus}/share/dbus-1/session.conf \
62       ${python.interpreter} nix_run_setup test
63     runHook postCheck
64   '';
66   dontWrapGApps = true;
68   preFixup = ''
69     makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
70   '';
72   # TODO: Tests require accessibility
73   doCheck = false;
75   meta = {
76     description = "GUI test tool and automation framework that uses Accessibility technologies to communicate with desktop applications";
77     homepage = "https://gitlab.com/dogtail/dogtail";
78     license = lib.licenses.gpl2Only;
79     maintainers = [ ];
80   };