5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
63 lines
1.4 KiB
Nix
63 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
poetry-core,
|
|
pysigma,
|
|
pysigma-backend-elasticsearch,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
pythonRelaxDepsHook,
|
|
requests,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pysigma-backend-opensearch";
|
|
version = "1.0.2";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SigmaHQ";
|
|
repo = "pySigma-backend-opensearch";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-VEMt9CKbhPRj1182WcLOqF9JOEzorrz9Yyqp0+FAA88=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail " --cov=sigma --cov-report term --cov-report xml:cov.xml" ""
|
|
'';
|
|
|
|
pythonRelaxDeps = [ "pysigma" ];
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
|
|
|
dependencies = [
|
|
pysigma
|
|
pysigma-backend-elasticsearch
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
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";
|
|
changelog = "https://github.com/SigmaHQ/pySigma-backend-opensearch/releases/tag/v${version}";
|
|
license = with licenses; [ lgpl21Only ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|