2018-12-23 21:56:58 +00:00
|
|
|
{ buildPythonPackage, stdenv, lxml, click, fetchFromGitHub, pytest, isPy3k }:
|
2018-03-10 23:09:11 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-10-23 15:44:05 +01:00
|
|
|
version = "0.3.21";
|
2018-03-10 23:09:11 +00:00
|
|
|
pname = "pyaxmlparser";
|
|
|
|
|
2018-12-23 21:56:58 +00:00
|
|
|
# the PyPI tarball doesn't ship tests.
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "appknox";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-10-23 15:44:05 +01:00
|
|
|
sha256 = "1bphd2vl9akk78yqvvxcz36wmr47hp3nh6xyrdc8w1avy1aby1ij";
|
2018-03-10 23:09:11 +00:00
|
|
|
};
|
|
|
|
|
2018-12-23 21:56:58 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace "click==6.7" "click"
|
|
|
|
'';
|
|
|
|
|
2018-03-10 23:09:11 +00:00
|
|
|
propagatedBuildInputs = [ lxml click ];
|
|
|
|
|
2018-12-23 21:56:58 +00:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
checkPhase = ''
|
|
|
|
py.test tests/
|
|
|
|
'';
|
|
|
|
|
2018-03-10 23:09:11 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Python3 Parser for Android XML file and get Application Name without using Androguard";
|
|
|
|
homepage = https://github.com/appknox/pyaxmlparser;
|
2019-01-20 01:58:54 +00:00
|
|
|
# Files from Androguard are licensed ASL 2.0
|
|
|
|
license = with licenses; [ mit asl20 ];
|
2018-03-10 23:09:11 +00:00
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
};
|
|
|
|
}
|