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
962 B
Nix
Raw Normal View History

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