depot/third_party/nixpkgs/pkgs/development/python-modules/adb-enhanced/default.nix
Default email 8a45d4525b Project import generated by Copybara.
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
2022-03-30 11:31:56 +02:00

47 lines
921 B
Nix

{ lib
, buildPythonPackage
, docopt
, fetchFromGitHub
, jdk11
, psutil
, pythonOlder
}:
buildPythonPackage rec {
pname = "adb-enhanced";
version = "2.5.14";
disabled = pythonOlder "3.4";
src = fetchFromGitHub {
owner = "ashishb";
repo = pname;
rev = version;
sha256 = "sha256-GaPOYBQEGI40MutjjY8exABqGge2p/buk9v+NcZ5oJs=";
};
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";
};
}