Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, poetry-core 5, pysigma 6, pysigma-backend-elasticsearch 7, pytestCheckHook 8, pythonOlder 9, requests 10}: 11 12buildPythonPackage rec { 13 pname = "pysigma-backend-opensearch"; 14 version = "1.0.0"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchFromGitHub { 20 owner = "SigmaHQ"; 21 repo = "pySigma-backend-opensearch"; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-erqKAtTNMQQy/zUkpOd0LoQT2MY2mgz5yGuSQJ0QTjI="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace " --cov=sigma --cov-report term --cov-report xml:cov.xml" "" 29 ''; 30 31 nativeBuildInputs = [ 32 poetry-core 33 ]; 34 35 propagatedBuildInputs = [ 36 pysigma 37 pysigma-backend-elasticsearch 38 ]; 39 40 nativeCheckInputs = [ 41 pytestCheckHook 42 requests 43 ]; 44 45 pythonImportsCheck = [ 46 "sigma.backends.opensearch" 47 ]; 48 49 disabledTests = [ 50 # Tests requires network access 51 "test_connect_lucene" 52 ]; 53 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 }; 61}