1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
{
lib,
buildPythonPackage,
diskcache-stubs,
diskcache,
fetchFromGitHub,
jinja2,
packaging,
poetry-core,
pyparsing,
pytestCheckHook,
pyyaml,
requests,
types-pyyaml,
typing-extensions,
writableTmpDirAsHomeHook,
}:
buildPythonPackage (finalAttrs: {
pname = "pysigma";
version = "1.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "SigmaHQ";
repo = "pySigma";
tag = "v${finalAttrs.version}";
hash = "sha256-+YyRfEhPRZLIo9T4mpYL5a/37CwWxAcuEOF+coR7erM=";
};
pythonRelaxDeps = [
"diskcache-stubs"
"jinja2"
"packaging"
"pyparsing"
"types-pyyaml"
];
build-system = [ poetry-core ];
dependencies = [
diskcache
diskcache-stubs
jinja2
packaging
pyparsing
pyyaml
requests
types-pyyaml
typing-extensions
];
nativeCheckInputs = [
pytestCheckHook
writableTmpDirAsHomeHook
];
disabledTests = [
# Tests require network connection
"test_sigma_plugin_directory_default"
"test_sigma_plugin_directory_get_plugins_compatible"
"test_sigma_plugin_find_compatible_version"
"test_sigma_plugin_installation"
"test_sigma_plugin_pysigma_version_from_pypi"
"test_sigma_plugin_version_compatible"
"test_validator_valid_attack_tags_online"
"test_validator_valid_d3fend_tags_online"
];
pythonImportsCheck = [ "sigma" ];
meta = {
description = "Library to parse and convert Sigma rules into queries";
homepage = "https://github.com/SigmaHQ/pySigma";
changelog = "https://github.com/SigmaHQ/pySigma/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.lgpl21Only;
maintainers = with lib.maintainers; [ fab ];
};
})
|