Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 91 lines 1.8 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 future, 7 networkx, 8 pygments, 9 lxml, 10 colorama, 11 matplotlib, 12 asn1crypto, 13 click, 14 pydot, 15 ipython, 16 pyqt5, 17 pyperclip, 18 pytestCheckHook, 19 python-magic, 20 qt5, 21 # This is usually used as a library, and it'd be a shame to force the GUI 22 # libraries to the closure if GUI is not desired. 23 withGui ? false, 24 # Deprecated in 24.11. 25 doCheck ? true, 26}: 27 28assert lib.warnIf (!doCheck) "python3Packages.androguard: doCheck is deprecated" true; 29 30buildPythonPackage rec { 31 pname = "androguard"; 32 version = "3.4.0a1"; 33 pyproject = true; 34 35 src = fetchFromGitHub { 36 repo = pname; 37 owner = pname; 38 rev = "v${version}"; 39 sha256 = "1aparxiq11y0hbvkayp92w684nyxyyx7mi0n1x6x51g5z6c58vmy"; 40 }; 41 42 patches = [ 43 ./drop-removed-networkx-formats.patch 44 ./fix-tests.patch 45 ]; 46 47 build-system = [ setuptools ]; 48 49 nativeBuildInputs = lib.optionals withGui [ qt5.wrapQtAppsHook ]; 50 51 dependencies = 52 [ 53 asn1crypto 54 click 55 colorama 56 future 57 ipython 58 lxml 59 matplotlib 60 networkx 61 pydot 62 pygments 63 ] 64 ++ networkx.optional-dependencies.default 65 ++ networkx.optional-dependencies.extra 66 ++ lib.optionals withGui [ 67 pyqt5 68 pyperclip 69 ]; 70 71 nativeCheckInputs = [ 72 pytestCheckHook 73 pyperclip 74 pyqt5 75 python-magic 76 ]; 77 78 # If it won't be verbose, you'll see nothing going on for a long time. 79 pytestFlagsArray = [ "--verbose" ]; 80 81 preFixup = lib.optionalString withGui '' 82 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 83 ''; 84 85 meta = { 86 description = "Tool and Python library to interact with Android Files"; 87 homepage = "https://github.com/androguard/androguard"; 88 license = lib.licenses.asl20; 89 maintainers = with lib.maintainers; [ pmiddend ]; 90 }; 91}