1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, pysigma
6, pytestCheckHook
7, pythonOlder
8, requests
9}:
10
11buildPythonPackage rec {
12 pname = "pysigma-backend-elasticsearch";
13 version = "1.0.9";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "SigmaHQ";
20 repo = "pySigma-backend-elasticsearch";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-OZaUKEEvgEIukEcAHB9ci/XWCU+h1CvQTU3gwWBOBkY=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace " --cov=sigma --cov-report term --cov-report xml:cov.xml" ""
28 '';
29
30 nativeBuildInputs = [
31 poetry-core
32 ];
33
34 propagatedBuildInputs = [
35 pysigma
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 requests
41 ];
42
43 pythonImportsCheck = [
44 "sigma.backends.elasticsearch"
45 ];
46
47 disabledTests = [
48 # Tests requires network access
49 "test_connect_lucene"
50 ];
51
52 meta = with lib; {
53 description = "Library to support Elasticsearch for pySigma";
54 homepage = "https://github.com/SigmaHQ/pySigma-backend-elasticsearch";
55 changelog = "https://github.com/SigmaHQ/pySigma-backend-elasticsearch/releases/tag/v${version}";
56 license = with licenses; [ lgpl21Only ];
57 maintainers = with maintainers; [ fab ];
58 };
59}