2024-04-27 14:13:53 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pysigma,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
2022-08-07 19:05:54 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysigma-backend-elasticsearch";
|
2024-06-22 10:39:30 +02:00
|
|
|
version = "1.1.1";
|
2024-01-12 09:18:05 +01:00
|
|
|
pyproject = true;
|
2022-08-07 19:05:54 +02:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SigmaHQ";
|
|
|
|
repo = "pySigma-backend-elasticsearch";
|
2022-09-20 13:11:51 +02:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-22 10:39:30 +02:00
|
|
|
hash = "sha256-NrA7+iwjmYIOqLGRUJSWhOjFb6V542r0PWxuZG3O/Yo=";
|
2022-08-07 19:05:54 +02:00
|
|
|
};
|
|
|
|
|
2023-04-21 21:41:49 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-02-10 10:10:53 +01:00
|
|
|
--replace-fail " --cov=sigma --cov-report term --cov-report xml:cov.xml" ""
|
2023-04-21 21:41:49 +02:00
|
|
|
'';
|
|
|
|
|
2024-04-27 14:13:53 +02:00
|
|
|
build-system = [ poetry-core ];
|
2022-08-07 19:05:54 +02:00
|
|
|
|
2024-04-27 14:13:53 +02:00
|
|
|
dependencies = [ pysigma ];
|
2022-08-07 19:05:54 +02:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-07 19:05:54 +02:00
|
|
|
pytestCheckHook
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2024-04-27 14:13:53 +02:00
|
|
|
pythonImportsCheck = [ "sigma.backends.elasticsearch" ];
|
2022-08-07 19:05:54 +02: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-08 00:07:10 +01:00
|
|
|
changelog = "https://github.com/SigmaHQ/pySigma-backend-elasticsearch/releases/tag/v${version}";
|
2022-08-07 19:05:54 +02:00
|
|
|
license = with licenses; [ lgpl21Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|