2021-04-13 19:44:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonOlder
|
2021-04-13 19:44:15 +00:00
|
|
|
, yara
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yara-python";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "4.2.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-04-13 19:44:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "VirusTotal";
|
|
|
|
repo = "yara-python";
|
|
|
|
rev = "v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
hash = "sha256-jNxYuIddMzANZoQ0p7BbRrX6ISpaCA7T6j+iS+FOocg=";
|
2021-04-13 19:44:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
yara
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
setupPyBuildFlags = [
|
|
|
|
"--dynamic-linking"
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests.py"
|
|
|
|
];
|
2021-04-13 19:44:15 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"yara"
|
|
|
|
];
|
2021-04-13 19:44:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python interface for YARA";
|
|
|
|
homepage = "https://github.com/VirusTotal/yara-python";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|