depot/third_party/nixpkgs/pkgs/development/python-modules/adb-enhanced/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

51 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
docopt,
fetchFromGitHub,
jdk11,
psutil,
pythonOlder,
}:
buildPythonPackage rec {
pname = "adb-enhanced";
version = "2.5.24";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ashishb";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-0HxeL6VGM+HTiAxs3NFRcEFbmH9q+0/pJdGyF1hl4hU=";
};
propagatedBuildInputs = [
psutil
docopt
];
postPatch = ''
substituteInPlace adbe/adb_enhanced.py \
--replace "cmd = 'java" "cmd = '${jdk11}/bin/java"
'';
# Disable tests because they require a dedicated Android emulator
doCheck = false;
pythonImportsCheck = [ "adbe" ];
meta = with lib; {
description = "Tool for Android testing and development";
homepage = "https://github.com/ashishb/adb-enhanced";
sourceProvenance = with sourceTypes; [
fromSource
binaryBytecode
];
license = licenses.asl20;
maintainers = with maintainers; [ vtuan10 ];
mainProgram = "adbe";
};
}