2020-10-08 10:20:06 +01:00
|
|
|
{ lib
|
|
|
|
, fetchpatch
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
|
|
|
, networkx
|
|
|
|
, pygments
|
|
|
|
, lxml
|
|
|
|
, colorama
|
|
|
|
, matplotlib
|
|
|
|
, asn1crypto
|
|
|
|
, click
|
|
|
|
, pydot
|
|
|
|
, ipython
|
|
|
|
, pyqt5
|
|
|
|
, pyperclip
|
|
|
|
, nose
|
|
|
|
, nose-timer
|
|
|
|
, mock
|
|
|
|
, python_magic
|
|
|
|
, codecov
|
|
|
|
, coverage
|
|
|
|
, qt5
|
|
|
|
# This is usually used as a library, and it'd be a shame to force the gui
|
|
|
|
# libraries to the closure if gui is not desired.
|
|
|
|
, withGui ? false
|
|
|
|
# Tests take a very long time, and currently fail, but next release' tests
|
|
|
|
# shouldn't fail
|
|
|
|
, doCheck ? false
|
|
|
|
}:
|
2019-01-28 14:37:01 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-02-23 14:36:00 +00:00
|
|
|
version = "3.3.5";
|
2019-01-28 14:37:01 +00:00
|
|
|
pname = "androguard";
|
|
|
|
|
2020-10-08 10:20:06 +01:00
|
|
|
# No tests in pypi tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = pname;
|
|
|
|
owner = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0zc8m1xnkmhz2v12ddn47q0c01p3sbna2v5npfxhcp88szswlr9y";
|
2019-01-28 14:37:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
future
|
|
|
|
networkx
|
|
|
|
pygments
|
|
|
|
lxml
|
|
|
|
colorama
|
|
|
|
matplotlib
|
|
|
|
asn1crypto
|
|
|
|
click
|
|
|
|
pydot
|
|
|
|
ipython
|
2020-10-08 10:20:06 +01:00
|
|
|
] ++ lib.optionals withGui [
|
2019-01-28 14:37:01 +00:00
|
|
|
pyqt5
|
|
|
|
pyperclip
|
|
|
|
];
|
|
|
|
|
2020-10-08 10:20:06 +01:00
|
|
|
checkInputs = [
|
|
|
|
pyqt5
|
|
|
|
pyperclip
|
|
|
|
nose
|
|
|
|
nose-timer
|
|
|
|
codecov
|
|
|
|
coverage
|
|
|
|
mock
|
|
|
|
python_magic
|
|
|
|
];
|
|
|
|
inherit doCheck;
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals withGui [ qt5.wrapQtAppsHook ];
|
|
|
|
|
|
|
|
# If it won't be verbose, you'll see nothing going on for a long time.
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
nosetests --verbosity=3
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = lib.optionalString withGui ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
|
|
|
'';
|
2019-01-28 14:37:01 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Tool and python library to interact with Android Files";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/androguard/androguard";
|
2019-01-28 14:37:01 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = [ lib.maintainers.pmiddend ];
|
|
|
|
};
|
|
|
|
}
|