2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, docopt
|
|
|
|
, fetchFromGitHub
|
|
|
|
, jdk11
|
|
|
|
, psutil
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "adb-enhanced";
|
2021-10-17 09:34:42 +00:00
|
|
|
version = "2.5.12";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ashishb";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-10-17 09:34:42 +00:00
|
|
|
sha256 = "sha256-OZSLk5qXX6rEclo6JC8o/7Mz0Y2sJqUsLhnrVK4gkVI=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
psutil
|
|
|
|
docopt
|
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace adbe/adb_enhanced.py \
|
|
|
|
--replace "cmd = 'java" "cmd = '${jdk11}/bin/java"
|
|
|
|
'';
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
# Disable tests because they require a dedicated Android emulator
|
2021-03-09 03:18:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"adbe"
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool for Android testing and development";
|
|
|
|
homepage = "https://github.com/ashishb/adb-enhanced";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ vtuan10 ];
|
2021-05-03 20:48:10 +00:00
|
|
|
mainProgram = "adbe";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
}
|