2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
python,
|
|
|
|
pygobject3,
|
|
|
|
pyatspi,
|
|
|
|
pycairo,
|
|
|
|
at-spi2-core,
|
|
|
|
gobject-introspection,
|
|
|
|
gtk3,
|
|
|
|
gsettings-desktop-schemas,
|
|
|
|
fetchurl,
|
|
|
|
dbus,
|
|
|
|
xvfb-run,
|
|
|
|
wrapGAppsHook3,
|
2020-04-24 23:36:52 +00:00
|
|
|
# , fetchPypi
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
pname = "dogtail";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "0.9.11";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
];
|
2021-10-14 00:43:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# https://gitlab.com/dogtail/dogtail/issues/1
|
|
|
|
# src = fetchPypi {
|
|
|
|
# inherit pname version;
|
|
|
|
# sha256 = "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x";
|
|
|
|
# };
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://gitlab.com/dogtail/dogtail/raw/released/dogtail-0.9.10.tar.gz";
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "EGyxYopupfXPYtTL9mm9ujZorvh8AGaNXVKBPWsGy3c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
patches = [ ./nix-support.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
dbus
|
|
|
|
xvfb-run
|
|
|
|
wrapGAppsHook3
|
|
|
|
]; # for setup hooks
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
at-spi2-core
|
|
|
|
gtk3
|
|
|
|
pygobject3
|
|
|
|
pyatspi
|
|
|
|
pycairo
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:$XDG_DATA_DIRS
|
|
|
|
# export NO_AT_BRIDGE=1
|
|
|
|
gsettings set org.gnome.desktop.interface toolkit-accessibility true
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
|
2022-12-02 08:20:57 +00:00
|
|
|
--config-file=${dbus}/share/dbus-1/session.conf \
|
2020-04-24 23:36:52 +00:00
|
|
|
${python.interpreter} nix_run_setup test
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# TODO: Tests require accessibility
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "GUI test tool and automation framework that uses Accessibility technologies to communicate with desktop applications";
|
|
|
|
homepage = "https://gitlab.com/dogtail/dogtail";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = lib.licenses.gpl2Only;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|