2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
jinja2,
|
|
|
|
packaging,
|
|
|
|
poetry-core,
|
|
|
|
pyparsing,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysigma";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.11.5";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SigmaHQ";
|
|
|
|
repo = "pySigma";
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-Mr4etI6VNPWDVZj4A9j3Ka9v+BpFC75MLXppYELIWrg=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
pythonRelaxDeps = [
|
2024-02-29 20:09:43 +00:00
|
|
|
"jinja2"
|
2023-10-09 19:29:22 +00:00
|
|
|
"packaging"
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ poetry-core ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-10-09 19:29:22 +00:00
|
|
|
jinja2
|
2023-03-15 16:39:30 +00:00
|
|
|
packaging
|
2022-03-30 09:31:56 +00:00
|
|
|
pyparsing
|
|
|
|
pyyaml
|
2023-03-15 16:39:30 +00:00
|
|
|
requests
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabledTests = [
|
2024-01-02 11:29:13 +00:00
|
|
|
# Tests require network connection
|
2023-03-15 16:39:30 +00:00
|
|
|
"test_sigma_plugin_directory_default"
|
|
|
|
"test_sigma_plugin_installation"
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "sigma" ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to parse and convert Sigma rules into queries";
|
|
|
|
homepage = "https://github.com/SigmaHQ/pySigma";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/SigmaHQ/pySigma/releases/tag/v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = with licenses; [ lgpl21Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|