3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/adb-enhanced/default.nix
2021-10-20 09:47:48 -07:00

48 lines
921 B
Nix

{ lib
, buildPythonPackage
, docopt
, fetchFromGitHub
, jdk11
, psutil
, pythonOlder
}:
buildPythonPackage rec {
pname = "adb-enhanced";
version = "2.5.12";
disabled = pythonOlder "3.4";
src = fetchFromGitHub {
owner = "ashishb";
repo = pname;
rev = version;
sha256 = "sha256-OZSLk5qXX6rEclo6JC8o/7Mz0Y2sJqUsLhnrVK4gkVI=";
};
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";
license = licenses.asl20;
maintainers = with maintainers; [ vtuan10 ];
mainProgram = "adbe";
};
}