1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 apkinspector, 7 networkx, 8 pygments, 9 lxml, 10 colorama, 11 cryptography, 12 dataset, 13 frida-python, 14 loguru, 15 matplotlib, 16 asn1crypto, 17 click, 18 mutf8, 19 pyyaml, 20 pydot, 21 ipython, 22 oscrypto, 23 pyqt5, 24 pytestCheckHook, 25 python-magic, 26 qt5, 27 # This is usually used as a library, and it'd be a shame to force the GUI 28 # libraries to the closure if GUI is not desired. 29 withGui ? false, 30 # Deprecated in 24.11. 31 doCheck ? true, 32}: 33 34assert lib.warnIf (!doCheck) "python3Packages.androguard: doCheck is deprecated" true; 35 36buildPythonPackage rec { 37 pname = "androguard"; 38 version = "4.1.3"; 39 pyproject = true; 40 41 src = fetchFromGitHub { 42 repo = pname; 43 owner = pname; 44 tag = "v${version}"; 45 sha256 = "sha256-qz6x7UgYXal1DbQGzi4iKnSGEn873rKibKme/pF7tLk="; 46 }; 47 48 build-system = [ 49 poetry-core 50 ]; 51 52 nativeBuildInputs = lib.optionals withGui [ qt5.wrapQtAppsHook ]; 53 54 dependencies = 55 [ 56 apkinspector 57 asn1crypto 58 click 59 colorama 60 cryptography 61 dataset 62 frida-python 63 ipython 64 loguru 65 lxml 66 matplotlib 67 mutf8 68 networkx 69 oscrypto 70 pydot 71 pygments 72 pyyaml 73 ] 74 ++ networkx.optional-dependencies.default 75 ++ networkx.optional-dependencies.extra 76 ++ lib.optionals withGui [ 77 pyqt5 78 ]; 79 80 nativeCheckInputs = [ 81 pytestCheckHook 82 pyqt5 83 python-magic 84 ]; 85 86 # If it won't be verbose, you'll see nothing going on for a long time. 87 pytestFlagsArray = [ "--verbose" ]; 88 89 preFixup = lib.optionalString withGui '' 90 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 91 ''; 92 93 meta = { 94 description = "Tool and Python library to interact with Android Files"; 95 homepage = "https://github.com/androguard/androguard"; 96 license = lib.licenses.asl20; 97 maintainers = with lib.maintainers; [ pmiddend ]; 98 }; 99}