1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 jinja2,
7 packaging,
8 poetry-core,
9 pyparsing,
10 pytestCheckHook,
11 pythonOlder,
12 pythonRelaxDepsHook,
13 pyyaml,
14 requests,
15}:
16
17buildPythonPackage rec {
18 pname = "pysigma";
19 version = "0.11.5";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "SigmaHQ";
26 repo = "pySigma";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-Mr4etI6VNPWDVZj4A9j3Ka9v+BpFC75MLXppYELIWrg=";
29 };
30
31 pythonRelaxDeps = [
32 "jinja2"
33 "packaging"
34 ];
35
36 build-system = [ poetry-core ];
37
38 nativeBuildInputs = [ pythonRelaxDepsHook ];
39
40 dependencies = [
41 jinja2
42 packaging
43 pyparsing
44 pyyaml
45 requests
46 ];
47
48 nativeCheckInputs = [ pytestCheckHook ];
49
50 disabledTests = [
51 # Tests require network connection
52 "test_sigma_plugin_directory_default"
53 "test_sigma_plugin_installation"
54 ];
55
56 pythonImportsCheck = [ "sigma" ];
57
58 meta = with lib; {
59 description = "Library to parse and convert Sigma rules into queries";
60 homepage = "https://github.com/SigmaHQ/pySigma";
61 changelog = "https://github.com/SigmaHQ/pySigma/releases/tag/v${version}";
62 license = with licenses; [ lgpl21Only ];
63 maintainers = with maintainers; [ fab ];
64 };
65}