Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ buildPythonPackage, stdenv, lxml, click, fetchFromGitHub, pytest, isPy3k }: 2 3buildPythonPackage rec { 4 version = "0.3.24"; 5 pname = "pyaxmlparser"; 6 7 # the PyPI tarball doesn't ship tests. 8 src = fetchFromGitHub { 9 owner = "appknox"; 10 repo = pname; 11 rev = "v${version}"; 12 sha256 = "0fys26p7xhbnbdzp80zm6n3mragp38p08nyrsnilfgnlpi6rjpg0"; 13 }; 14 15 disabled = !isPy3k; 16 17 postPatch = '' 18 substituteInPlace setup.py --replace "click==6.7" "click" 19 ''; 20 21 propagatedBuildInputs = [ lxml click ]; 22 23 checkInputs = [ pytest ]; 24 checkPhase = '' 25 py.test tests/ 26 ''; 27 28 meta = with stdenv.lib; { 29 description = "Python3 Parser for Android XML file and get Application Name without using Androguard"; 30 homepage = "https://github.com/appknox/pyaxmlparser"; 31 # Files from Androguard are licensed ASL 2.0 32 license = with licenses; [ mit asl20 ]; 33 maintainers = with maintainers; [ ma27 ]; 34 }; 35}