587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
69 lines
1.2 KiB
Nix
69 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, jinja2
|
|
, packaging
|
|
, poetry-core
|
|
, pyparsing
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, pythonRelaxDepsHook
|
|
, pyyaml
|
|
, requests
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pysigma";
|
|
version = "0.11.4";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SigmaHQ";
|
|
repo = "pySigma";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-tlFrUAwOTK+O/YJjfA6nwsVAcZrMNXFmCYoxHc2ykVY=";
|
|
};
|
|
|
|
pythonRelaxDeps = [
|
|
"jinja2"
|
|
"packaging"
|
|
];
|
|
|
|
build-system = [
|
|
poetry-core
|
|
pythonRelaxDepsHook
|
|
];
|
|
|
|
dependencies = [
|
|
jinja2
|
|
packaging
|
|
pyparsing
|
|
pyyaml
|
|
requests
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# Tests require network connection
|
|
"test_sigma_plugin_directory_default"
|
|
"test_sigma_plugin_installation"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"sigma"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Library to parse and convert Sigma rules into queries";
|
|
homepage = "https://github.com/SigmaHQ/pySigma";
|
|
changelog = "https://github.com/SigmaHQ/pySigma/releases/tag/v${version}";
|
|
license = with licenses; [ lgpl21Only ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|