c7e6337bd0
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
59 lines
1.2 KiB
Nix
59 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, pysigma
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, requests
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pysigma-backend-elasticsearch";
|
|
version = "1.0.3";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SigmaHQ";
|
|
repo = "pySigma-backend-elasticsearch";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-NjMfJgM8YaJiQp8rucR099y4ZFG98XnxK1KZlnZb+MI=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace " --cov=sigma --cov-report term --cov-report xml:cov.xml" ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
pysigma
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
requests
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"sigma.backends.elasticsearch"
|
|
];
|
|
|
|
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";
|
|
changelog = "https://github.com/SigmaHQ/pySigma-backend-elasticsearch/releases/tag/v${version}";
|
|
license = with licenses; [ lgpl21Only ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|