1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, future 5, networkx 6, pygments 7, lxml 8, colorama 9, matplotlib 10, asn1crypto 11, click 12, pydot 13, ipython 14, pyqt5 15, pyperclip 16, nose 17, nose-timer 18, mock 19, python_magic 20, codecov 21, coverage 22, qt5 23# This is usually used as a library, and it'd be a shame to force the GUI 24# libraries to the closure if GUI is not desired. 25, withGui ? false 26# Tests take a very long time, and currently fail, but next release' tests 27# shouldn't fail 28, doCheck ? false 29}: 30 31buildPythonPackage rec { 32 pname = "androguard"; 33 version = "3.4.0a1"; 34 35 src = fetchFromGitHub { 36 repo = pname; 37 owner = pname; 38 rev = "v${version}"; 39 sha256 = "1aparxiq11y0hbvkayp92w684nyxyyx7mi0n1x6x51g5z6c58vmy"; 40 }; 41 42 propagatedBuildInputs = [ 43 asn1crypto 44 click 45 colorama 46 future 47 ipython 48 lxml 49 matplotlib 50 networkx 51 pydot 52 pygments 53 ] ++ lib.optionals withGui [ 54 pyqt5 55 pyperclip 56 ]; 57 58 checkInputs = [ 59 codecov 60 coverage 61 mock 62 nose 63 nose-timer 64 pyperclip 65 pyqt5 66 python_magic 67 ]; 68 inherit doCheck; 69 70 nativeBuildInputs = lib.optionals withGui [ 71 qt5.wrapQtAppsHook 72 ]; 73 74 # If it won't be verbose, you'll see nothing going on for a long time. 75 checkPhase = '' 76 runHook preCheck 77 nosetests --verbosity=3 78 runHook postCheck 79 ''; 80 81 preFixup = lib.optionalString withGui '' 82 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 83 ''; 84 85 meta = with lib; { 86 description = "Tool and Python library to interact with Android Files"; 87 homepage = "https://github.com/androguard/androguard"; 88 license = licenses.asl20; 89 maintainers = with maintainers; [ pmiddend ]; 90 }; 91}