1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6, yara 7}: 8 9buildPythonPackage rec { 10 pname = "yara-python"; 11 version = "4.2.3"; 12 format = "setuptools"; 13 14 disabled = pythonOlder "3.7"; 15 16 src = fetchFromGitHub { 17 owner = "VirusTotal"; 18 repo = "yara-python"; 19 rev = "v${version}"; 20 hash = "sha256-spUQuezQMqaG1hboM0/Gs7siCM6x0b40O+sV7qGGBng="; 21 }; 22 23 buildInputs = [ 24 yara 25 ]; 26 27 checkInputs = [ 28 pytestCheckHook 29 ]; 30 31 setupPyBuildFlags = [ 32 "--dynamic-linking" 33 ]; 34 35 pytestFlagsArray = [ 36 "tests.py" 37 ]; 38 39 pythonImportsCheck = [ 40 "yara" 41 ]; 42 43 meta = with lib; { 44 description = "Python interface for YARA"; 45 homepage = "https://github.com/VirusTotal/yara-python"; 46 license = with licenses; [ asl20 ]; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}