2021-04-13 19:44:15 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "apkid";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "2.1.5";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
2021-04-13 19:44:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rednaga";
|
|
|
|
repo = "APKiD";
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-yO3k2kT043/KkiCjDnNUlqxX86kQqMZ+CghD+yon3r4=";
|
2021-04-13 19:44:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
yara-python
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2021-04-13 19:44:15 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
# Prepare the YARA rules
|
|
|
|
${python3.interpreter} prep-release.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
# We have dex support enabled in yara-python
|
2021-04-13 19:44:15 +00:00
|
|
|
substituteInPlace setup.py \
|
2022-06-16 17:23:12 +00:00
|
|
|
--replace "yara-python-dex>=1.0.1" "yara-python"
|
2021-04-13 19:44:15 +00:00
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"apkid"
|
|
|
|
];
|
2021-04-13 19:44:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Android Application Identifier";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "apkid";
|
2021-04-13 19:44:15 +00:00
|
|
|
homepage = "https://github.com/rednaga/APKiD";
|
|
|
|
license = with licenses; [ gpl3Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|