nixpkgs/pkgs/development/python-modules/dogtail/default.nix

61 lines
1.7 KiB
Nix
Raw Normal View History

2018-07-06 08:20:35 +01:00
{ lib
, buildPythonPackage
, python
, pygobject3
, pyatspi
, pycairo
, at-spi2-core
, gobject-introspection
2018-07-06 08:20:35 +01:00
, gtk3
, gsettings-desktop-schemas
, fetchurl
, dbus
, xvfb_run
2019-08-23 14:45:46 +01:00
, wrapGAppsHook
2018-07-06 08:20:35 +01:00
# , fetchPypi
}:
2019-08-13 22:52:01 +01:00
buildPythonPackage {
2018-07-06 08:20:35 +01:00
pname = "dogtail";
version = "0.9.11";
2018-07-06 08:20:35 +01: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";
sha256 = "EGyxYopupfXPYtTL9mm9ujZorvh8AGaNXVKBPWsGy3c=";
2018-07-06 08:20:35 +01:00
};
patches = [
./nix-support.patch
];
2019-08-23 14:45:46 +01:00
nativeBuildInputs = [ gobject-introspection dbus xvfb_run wrapGAppsHook ]; # for setup hooks
2018-07-06 08:20:35 +01:00
propagatedBuildInputs = [ at-spi2-core gtk3 pygobject3 pyatspi pycairo ];
2019-08-23 14:45:46 +01:00
strictDeps = false; # issue 56943
2018-07-06 08:20:35 +01: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 \
--config-file=${dbus.daemon}/share/dbus-1/session.conf \
${python.interpreter} nix_run_setup test
runHook postCheck
'';
# 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";
license = lib.licenses.gpl2Only;
2018-07-06 08:20:35 +01:00
maintainers = with lib.maintainers; [ jtojnar ];
};
}