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