Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pysigma-backend-opensearch / default.nix
blob3fdfd2bfdd6dc029db7a9a00c8462cc33086d4b0
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , poetry-core
5 , pysigma
6 , pysigma-backend-elasticsearch
7 , pytestCheckHook
8 , pythonOlder
9 , requests
12 buildPythonPackage rec {
13   pname = "pysigma-backend-opensearch";
14   version = "1.0.1";
15   format = "pyproject";
17   disabled = pythonOlder "3.8";
19   src = fetchFromGitHub {
20     owner = "SigmaHQ";
21     repo = "pySigma-backend-opensearch";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-g3kGaNq07yMu3mnRDeZB3Ck8wwzK3HcOIzkl36cNOs8=";
24   };
26   postPatch = ''
27     substituteInPlace pyproject.toml \
28       --replace " --cov=sigma --cov-report term --cov-report xml:cov.xml" ""
29   '';
31   nativeBuildInputs = [
32     poetry-core
33   ];
35   propagatedBuildInputs = [
36     pysigma
37     pysigma-backend-elasticsearch
38   ];
40   nativeCheckInputs = [
41     pytestCheckHook
42     requests
43   ];
45   pythonImportsCheck = [
46     "sigma.backends.opensearch"
47   ];
49   disabledTests = [
50     # Tests requires network access
51     "test_connect_lucene"
52   ];
54   meta = with lib; {
55     description = "Library to support OpenSearch for pySigma";
56     homepage = "https://github.com/SigmaHQ/pySigma-backend-opensearch";
57     changelog = "https://github.com/SigmaHQ/pySigma-backend-opensearch/releases/tag/v${version}";
58     license = with licenses; [ lgpl21Only ];
59     maintainers = with maintainers; [ fab ];
60   };