nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 docopt,
5 fetchFromGitHub,
6 setuptools,
7 jdk11,
8 psutil,
9}:
10
11buildPythonPackage rec {
12 pname = "adb-enhanced";
13 version = "2.8.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "ashishb";
18 repo = "adb-enhanced";
19 tag = version;
20 hash = "sha256-YuQgz3WeN50hg/IgdoNV61St9gpu6lcgFfKCfI/ENl0=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [
26 psutil
27 docopt
28 ];
29
30 postPatch = ''
31 substituteInPlace adbe/adb_enhanced.py \
32 --replace-fail "cmd = 'java" "cmd = '${jdk11}/bin/java"
33 '';
34
35 # Disable tests because they require a dedicated Android emulator
36 doCheck = false;
37
38 pythonImportsCheck = [ "adbe" ];
39
40 meta = {
41 description = "Tool for Android testing and development";
42 homepage = "https://github.com/ashishb/adb-enhanced";
43 sourceProvenance = with lib.sourceTypes; [
44 fromSource
45 binaryBytecode
46 ];
47 license = lib.licenses.asl20;
48 maintainers = with lib.maintainers; [ vtuan10 ];
49 mainProgram = "adbe";
50 };
51}