python3.pkgs.dogtail: init at 0.9.10
This commit is contained in:
parent
18b79b8fcb
commit
21f78529a5
|
@ -0,0 +1,58 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, python
|
||||
, pygobject3
|
||||
, pyatspi
|
||||
, pycairo
|
||||
, at-spi2-core
|
||||
, gobjectIntrospection
|
||||
, gtk3
|
||||
, gsettings-desktop-schemas
|
||||
, fetchurl
|
||||
, dbus
|
||||
, xvfb_run
|
||||
# , fetchPypi
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dogtail";
|
||||
version = "0.9.10";
|
||||
|
||||
# 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 = "14sycidl8ahj3fwlhpwlpnyd43c302yqr7nqg2hj39pyj7kgk15b";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./nix-support.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ gobjectIntrospection dbus xvfb_run ]; # for setup hooks
|
||||
propagatedBuildInputs = [ at-spi2-core gtk3 pygobject3 pyatspi pycairo ];
|
||||
|
||||
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.gpl2;
|
||||
maintainers = with lib.maintainers; [ jtojnar ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
--- a/dogtail/distro.py
|
||||
+++ b/dogtail/distro.py
|
||||
@@ -233,6 +233,11 @@
|
||||
PackageDb.__init__(self)
|
||||
|
||||
|
||||
+class _NixPackageDb(PackageDb): # pragma: no cover
|
||||
+ def __init__(self):
|
||||
+ PackageDb.__init__(self)
|
||||
+
|
||||
+
|
||||
class JhBuildPackageDb(PackageDb): # pragma: no cover
|
||||
def __init__(self):
|
||||
PackageDb.__init__(self)
|
||||
@@ -324,6 +329,11 @@
|
||||
self.packageDb = _SolarisPackageDb()
|
||||
|
||||
|
||||
+class Nix(Distro): # pragma: no cover
|
||||
+ def __init__(self):
|
||||
+ self.packageDb = _NixPackageDb()
|
||||
+
|
||||
+
|
||||
class JHBuild(Distro): # pragma: no cover
|
||||
def __init__(self):
|
||||
self.packageDb = JhBuildPackageDb()
|
||||
@@ -358,6 +368,8 @@
|
||||
elif os.path.exists("/etc/release") and \
|
||||
re.match(".*Solaris", open("/etc/release").readline()): # pragma: no cover
|
||||
distro = Solaris() # pragma: no cover
|
||||
+ elif os.path.exists("/nix/store"): # pragma: no cover
|
||||
+ distro = Nix() # pragma: no cover
|
||||
elif os.path.exists("/etc/os-release") and \
|
||||
re.match(".*GNOME-Continuous", open("/etc/os-release").readline()): # pragma: no cover
|
||||
distro = GnomeContinuous() # pragma: no cover
|
|
@ -263,6 +263,8 @@ in {
|
|||
|
||||
distorm3 = callPackage ../development/python-modules/distorm3 { };
|
||||
|
||||
dogtail = callPackage ../development/python-modules/dogtail { };
|
||||
|
||||
diff-match-patch = callPackage ../development/python-modules/diff-match-patch { };
|
||||
|
||||
fido2 = callPackage ../development/python-modules/fido2 { };
|
||||
|
|
Loading…
Reference in New Issue