depot/third_party/nixpkgs/pkgs/development/python-modules/pysigma-backend-opensearch/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

61 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pysigma
, pysigma-backend-elasticsearch
, pytestCheckHook
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "pysigma-backend-opensearch";
version = "1.0.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "SigmaHQ";
repo = "pySigma-backend-opensearch";
rev = "refs/tags/v${version}";
hash = "sha256-erqKAtTNMQQy/zUkpOd0LoQT2MY2mgz5yGuSQJ0QTjI=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=sigma --cov-report term --cov-report xml:cov.xml" ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
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 ];
};
}