diff --git a/pkgs/development/python-modules/pysigma-backend-elasticsearch/default.nix b/pkgs/development/python-modules/pysigma-backend-elasticsearch/default.nix new file mode 100644 index 000000000000..7ec64df2e1b8 --- /dev/null +++ b/pkgs/development/python-modules/pysigma-backend-elasticsearch/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pysigma +, pytestCheckHook +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "pysigma-backend-elasticsearch"; + version = "0.1.0"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "SigmaHQ"; + repo = "pySigma-backend-elasticsearch"; + rev = "v${version}"; + hash = "sha256-BEvYz0jTJifsNBrA4r16JkiFaERDj/zWKd9MbhcuCS8="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + pysigma + ]; + + checkInputs = [ + 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"; + 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 8b01d2c424d1..5c831e4466b7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8196,6 +8196,8 @@ in { pysigma = callPackage ../development/python-modules/pysigma { }; + pysigma-backend-elasticsearch = callPackage ../development/python-modules/pysigma-backend-elasticsearch { }; + pysigma-backend-splunk = callPackage ../development/python-modules/pysigma-backend-splunk { }; pysigma-backend-insightidr = callPackage ../development/python-modules/pysigma-backend-insightidr { };