depot/third_party/nixpkgs/pkgs/development/python-modules/pysigma-backend-elasticsearch/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

59 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pysigma
, pytestCheckHook
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "pysigma-backend-elasticsearch";
version = "1.0.12";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "SigmaHQ";
repo = "pySigma-backend-elasticsearch";
rev = "refs/tags/v${version}";
hash = "sha256-ibCwTZymgd+VuE4UXbYxUyIbzlpfIdc2zE8Nz/vhBGQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail " --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 ];
};
}