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";
|
2023-03-08 16:32:21 +00:00
|
|
|
version = "2.5.16";
|
|
|
|
format = "setuptools";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ashishb";
|
|
|
|
repo = pname;
|
2023-03-08 16:32:21 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-+CMXKg3LLxEXGcFQ9zSqy/1HPZS9MsQ1fZxClJ0Vrnw=";
|
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";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
fromSource
|
|
|
|
binaryBytecode
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|