nixpkgs/pkgs/development/tools/apkid/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
978 B
Nix
Raw Normal View History

2021-04-10 23:37:23 +00:00
{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "apkid";
2022-09-27 07:21:52 +00:00
version = "2.1.4";
2022-05-18 20:38:33 +00:00
format = "setuptools";
2021-04-10 23:37:23 +00:00
src = fetchFromGitHub {
owner = "rednaga";
repo = "APKiD";
2022-09-27 07:21:52 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-ASxly2dH+TnwvU3CYD52XbC79n2dku01j3+YHOZ745U=";
2021-04-10 23:37:23 +00:00
};
propagatedBuildInputs = with python3.pkgs; [
yara-python
];
nativeCheckInputs = with python3.pkgs; [
2021-04-10 23:37:23 +00:00
pytestCheckHook
];
preBuild = ''
# Prepare the YARA rules
${python3.interpreter} prep-release.py
'';
postPatch = ''
2022-05-18 20:38:33 +00:00
# We have dex support enabled in yara-python
2021-04-10 23:37:23 +00:00
substituteInPlace setup.py \
2022-05-18 20:38:33 +00:00
--replace "yara-python-dex>=1.0.1" "yara-python"
2021-04-10 23:37:23 +00:00
'';
2022-05-18 20:38:33 +00:00
pythonImportsCheck = [
"apkid"
];
2021-04-10 23:37:23 +00:00
meta = with lib; {
description = "Android Application Identifier";
homepage = "https://github.com/rednaga/APKiD";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ fab ];
};
}