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