11 buildPythonPackage rec {
12 pname = "yara-python";
16 disabled = pythonOlder "3.7";
18 src = fetchFromGitHub {
21 rev = "refs/tags/v${version}";
22 hash = "sha256-P+OQljzp+ZwVOXAgJqK7GNrqBep40MyVtMKDtT4ZUr8=";
25 # undefined symbol: yr_finalize
26 # https://github.com/VirusTotal/yara-python/issues/7
28 substituteInPlace setup.py \
29 --replace-fail "include_dirs=['yara/libyara/include', 'yara/libyara/', '.']" "libraries = ['yara']"
32 build-system = [ setuptools ];
34 buildInputs = [ yara ];
36 nativeCheckInputs = [ pytestCheckHook ];
38 setupPyBuildFlags = [ "--dynamic-linking" ];
40 pytestFlagsArray = [ "tests.py" ];
42 pythonImportsCheck = [ "yara" ];
45 description = "Python interface for YARA";
46 homepage = "https://github.com/VirusTotal/yara-python";
47 changelog = "https://github.com/VirusTotal/yara-python/releases/tag/v${version}";
48 license = licenses.asl20;
49 maintainers = with maintainers; [ fab ];