From df69944407b78a25f3291153b38e2ecf4e7ad76b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 7 Aug 2022 19:16:27 +0200 Subject: [PATCH] python310Packages.pysigma-backend-opensearch: init at 0.1.2 --- .../pysigma-backend-opensearch/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/pysigma-backend-opensearch/default.nix diff --git a/pkgs/development/python-modules/pysigma-backend-opensearch/default.nix b/pkgs/development/python-modules/pysigma-backend-opensearch/default.nix new file mode 100644 index 000000000000..36e44c629855 --- /dev/null +++ b/pkgs/development/python-modules/pysigma-backend-opensearch/default.nix @@ -0,0 +1,55 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pysigma +, pysigma-backend-elasticsearch +, pytestCheckHook +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "pysigma-backend-opensearch"; + version = "0.1.2"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "SigmaHQ"; + repo = "pySigma-backend-opensearch"; + rev = "v${version}"; + hash = "sha256-5+/LOi7GHu8h9WhjpZ7bBc4aM41NiXrSrdGhbXdYMvw="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + pysigma + pysigma-backend-elasticsearch + ]; + + checkInputs = [ + 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"; + license = with licenses; [ lgpl21Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5c831e4466b7..76ab4a8a7470 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8198,6 +8198,8 @@ in { pysigma-backend-elasticsearch = callPackage ../development/python-modules/pysigma-backend-elasticsearch { }; + pysigma-backend-opensearch = callPackage ../development/python-modules/pysigma-backend-opensearch { }; + pysigma-backend-splunk = callPackage ../development/python-modules/pysigma-backend-splunk { }; pysigma-backend-insightidr = callPackage ../development/python-modules/pysigma-backend-insightidr { };