Files
nixpkgs/pkgs/development/python-modules/androguard/default.nix
Aiden Schembri d4a0a49358 python3Packages.androguard: 4.1.3 -> 4.1.4
Drop stale oscrypto and NetworkX optional dependencies that are not declared or used by androguard. Frida and matplotlib became optional upstream in 4.1.4.

This also avoids unnecessarily pulling pygraphviz into the dependency closure.

Assisted-by: OpenAI Codex, GPT-5
2026-08-11 14:23:09 +02:00

91 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
apkinspector,
networkx,
pygments,
lxml,
colorama,
cryptography,
dataset,
loguru,
asn1crypto,
click,
mutf8,
pyyaml,
pydot,
ipython,
pyqt5,
pytestCheckHook,
python-magic,
qt5,
# 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.
withGui ? false,
# Deprecated in 24.11.
doCheck ? true,
}:
assert lib.warnIf (!doCheck) "python3Packages.androguard: doCheck is deprecated" true;
buildPythonPackage rec {
pname = "androguard";
version = "4.1.4";
pyproject = true;
src = fetchFromGitHub {
repo = "androguard";
owner = "androguard";
tag = "v${version}";
hash = "sha256-WajRUquDEzs0NanOLpb0gxnreqM8Jm/SxI2LYEifWxg=";
};
build-system = [
poetry-core
];
nativeBuildInputs = lib.optionals withGui [ qt5.wrapQtAppsHook ];
dependencies = [
apkinspector
asn1crypto
click
colorama
cryptography
dataset
ipython
loguru
lxml
mutf8
networkx
pydot
pygments
pyyaml
]
++ lib.optionals withGui [
pyqt5
];
nativeCheckInputs = [
pytestCheckHook
pyqt5
python-magic
];
# If it won't be verbose, you'll see nothing going on for a long time.
pytestFlags = [ "--verbose" ];
preFixup = lib.optionalString withGui ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = {
description = "Tool and Python library to interact with Android Files";
homepage = "https://github.com/androguard/androguard";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ pmiddend ];
};
}