depot/third_party/nixpkgs/pkgs/development/python-modules/pysigma/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

64 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
jinja2,
packaging,
poetry-core,
pyparsing,
pytestCheckHook,
pythonOlder,
pythonRelaxDepsHook,
pyyaml,
requests,
}:
buildPythonPackage rec {
pname = "pysigma";
version = "0.11.7";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "SigmaHQ";
repo = "pySigma";
rev = "refs/tags/v${version}";
hash = "sha256-vc2f5qrPHSU/CUENj+MuD0rjsEj68JPnL39fuOOcRCU=";
};
pythonRelaxDeps = [
"jinja2"
"packaging"
];
build-system = [ poetry-core ];
nativeBuildInputs = [ 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 ];
};
}