1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 ply,
8
9 pytestCheckHook,
10 pycodestyle,
11 pydocstyle,
12 pyflakes,
13 coverage,
14}:
15
16buildPythonPackage rec {
17 pname = "plyara";
18 version = "2.2.8";
19 pyproject = true;
20
21 disabled = pythonOlder "3.10"; # https://github.com/plyara/plyara: "Plyara requires Python 3.10+"
22
23 src = fetchFromGitHub {
24 owner = "plyara";
25 repo = "plyara";
26 tag = "v${version}";
27 hash = "sha256-WaQgqx003it+D0AGDxV6aSKO89F2iR9d8L4zvHyd0iQ=";
28 };
29
30 build-system = [
31 setuptools
32 ];
33
34 dependencies = [
35 ply
36 ];
37
38 pythonImportsCheck = [
39 "plyara"
40 ];
41
42 nativeCheckInputs = [
43 pytestCheckHook
44 pycodestyle
45 pydocstyle
46 pyflakes
47 coverage
48 ];
49
50 disabledTests = [
51 # touches network
52 "test_third_party_repositories"
53 ];
54
55 meta = {
56 description = "Parse YARA rules";
57 homepage = "https://github.com/plyara/plyara";
58 changelog = "https://github.com/plyara/plyara/releases/tag/v${version}";
59 license = lib.licenses.asl20;
60 maintainers = with lib.maintainers; [
61 _13621
62 ivyfanchiang
63 ];
64 };
65}