2020-10-11 12:50:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
|
|
|
, networkx
|
|
|
|
, pygments
|
|
|
|
, lxml
|
|
|
|
, colorama
|
|
|
|
, matplotlib
|
|
|
|
, asn1crypto
|
|
|
|
, click
|
|
|
|
, pydot
|
|
|
|
, ipython
|
2021-12-26 17:43:05 +00:00
|
|
|
, packaging
|
2020-10-11 12:50:04 +00:00
|
|
|
, pyqt5
|
|
|
|
, pyperclip
|
|
|
|
, nose
|
|
|
|
, nose-timer
|
|
|
|
, mock
|
2022-05-18 14:49:53 +00:00
|
|
|
, python-magic
|
2020-10-11 12:50:04 +00:00
|
|
|
, codecov
|
|
|
|
, coverage
|
|
|
|
, qt5
|
2021-10-08 15:17:17 +00:00
|
|
|
# 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.
|
2020-10-11 12:50:04 +00:00
|
|
|
, withGui ? false
|
|
|
|
# Tests take a very long time, and currently fail, but next release' tests
|
|
|
|
# shouldn't fail
|
|
|
|
, doCheck ? false
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "androguard";
|
2021-10-08 15:17:17 +00:00
|
|
|
version = "3.4.0a1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = pname;
|
|
|
|
owner = pname;
|
|
|
|
rev = "v${version}";
|
2021-10-08 15:17:17 +00:00
|
|
|
sha256 = "1aparxiq11y0hbvkayp92w684nyxyyx7mi0n1x6x51g5z6c58vmy";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
packaging
|
|
|
|
] ++ lib.optionals withGui [
|
|
|
|
qt5.wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-10-08 15:17:17 +00:00
|
|
|
asn1crypto
|
|
|
|
click
|
|
|
|
colorama
|
2020-04-24 23:36:52 +00:00
|
|
|
future
|
2021-10-08 15:17:17 +00:00
|
|
|
ipython
|
2020-04-24 23:36:52 +00:00
|
|
|
lxml
|
|
|
|
matplotlib
|
2021-10-08 15:17:17 +00:00
|
|
|
networkx
|
2020-04-24 23:36:52 +00:00
|
|
|
pydot
|
2021-10-08 15:17:17 +00:00
|
|
|
pygments
|
2020-10-11 12:50:04 +00:00
|
|
|
] ++ lib.optionals withGui [
|
2020-04-24 23:36:52 +00:00
|
|
|
pyqt5
|
|
|
|
pyperclip
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-10-11 12:50:04 +00:00
|
|
|
codecov
|
|
|
|
coverage
|
|
|
|
mock
|
2021-10-08 15:17:17 +00:00
|
|
|
nose
|
|
|
|
nose-timer
|
|
|
|
pyperclip
|
|
|
|
pyqt5
|
2022-05-18 14:49:53 +00:00
|
|
|
python-magic
|
2020-10-11 12:50:04 +00:00
|
|
|
];
|
|
|
|
inherit doCheck;
|
|
|
|
|
|
|
|
# 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[@]}")
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool and Python library to interact with Android Files";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/androguard/androguard";
|
2021-10-08 15:17:17 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ pmiddend ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|