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