2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pysigma,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysigma-backend-elasticsearch";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.1.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SigmaHQ";
|
|
|
|
repo = "pySigma-backend-elasticsearch";
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-1tCn0aPYhjyOQJxN0cqTMDCcE0eZwRtTK6OV3rU1a1E=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail " --cov=sigma --cov-report term --cov-report xml:cov.xml" ""
|
2023-04-29 16:46:19 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [ pysigma ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "sigma.backends.elasticsearch" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests requires network access
|
|
|
|
"test_connect_lucene"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to support Elasticsearch for pySigma";
|
|
|
|
homepage = "https://github.com/SigmaHQ/pySigma-backend-elasticsearch";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/SigmaHQ/pySigma-backend-elasticsearch/releases/tag/v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = with licenses; [ lgpl21Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|