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-11-29 05:15:56 +00:00
|
|
|
version = "0.3.24";
|
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-11-29 05:15:56 +00:00
|
|
|
sha256 = "0fys26p7xhbnbdzp80zm6n3mragp38p08nyrsnilfgnlpi6rjpg0";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|