2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
docopt,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
jdk11,
|
|
|
|
psutil,
|
|
|
|
pythonOlder,
|
2021-10-17 09:34:42 +00:00
|
|
|
}:
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "adb-enhanced";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "2.5.24";
|
2024-09-19 14:19:46 +00:00
|
|
|
pyproject = true;
|
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";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "adb-enhanced";
|
2023-03-08 16:32:21 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-0HxeL6VGM+HTiAxs3NFRcEFbmH9q+0/pJdGyF1hl4hU=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2021-10-17 09:34:42 +00:00
|
|
|
psutil
|
|
|
|
docopt
|
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace adbe/adb_enhanced.py \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail "cmd = 'java" "cmd = '${jdk11}/bin/java"
|
2021-03-09 03:18:52 +00:00
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
|
2024-06-05 15:53:02 +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
|
|
|
};
|
|
|
|
}
|