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