From 950676708e25c5b1586bb7ac5054e3b896ac4073 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 3 Mar 2025 16:54:39 +0100 Subject: [PATCH 1/2] python312Packages.pysigma-backend-elasticsearch: migrate to pytest-cov-stub --- .../pysigma-backend-elasticsearch/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pysigma-backend-elasticsearch/default.nix b/pkgs/development/python-modules/pysigma-backend-elasticsearch/default.nix index 02f8969bd400..b1cecd44d086 100644 --- a/pkgs/development/python-modules/pysigma-backend-elasticsearch/default.nix +++ b/pkgs/development/python-modules/pysigma-backend-elasticsearch/default.nix @@ -4,6 +4,7 @@ fetchFromGitHub, poetry-core, pysigma, + pytest-cov-stub, pytestCheckHook, pythonOlder, requests, @@ -23,16 +24,12 @@ buildPythonPackage rec { hash = "sha256-qIP+TP6lzviEAunYge/SIZQ6PI0EFnJo64FVpPmkdLY="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail " --cov=sigma --cov-report term --cov-report xml:cov.xml" "" - ''; - build-system = [ poetry-core ]; dependencies = [ pysigma ]; nativeCheckInputs = [ + pytest-cov-stub pytestCheckHook requests ]; @@ -50,7 +47,7 @@ buildPythonPackage rec { 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 ]; + license = licenses.lgpl21Only; maintainers = with maintainers; [ fab ]; }; } From 385662341c2318dcf5c1b48e3dbf7d4fef50c96c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 3 Mar 2025 16:57:11 +0100 Subject: [PATCH 2/2] python312Packages.pysigma-backend-opensearch: refactor --- .../pysigma-backend-opensearch/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pysigma-backend-opensearch/default.nix b/pkgs/development/python-modules/pysigma-backend-opensearch/default.nix index a1c1c61fa108..3acceaeaef5d 100644 --- a/pkgs/development/python-modules/pysigma-backend-opensearch/default.nix +++ b/pkgs/development/python-modules/pysigma-backend-opensearch/default.nix @@ -5,6 +5,7 @@ poetry-core, pysigma, pysigma-backend-elasticsearch, + pytest-cov-stub, pytestCheckHook, pythonOlder, requests, @@ -24,11 +25,6 @@ buildPythonPackage rec { hash = "sha256-VKDyXTvh0T/MKqsZo9lAlHyfhtiXzP5P+d0DSiLqS1o="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail " --cov=sigma --cov-report term --cov-report xml:cov.xml" "" - ''; - pythonRelaxDeps = [ "pysigma" ]; build-system = [ poetry-core ]; @@ -39,6 +35,7 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + pytest-cov-stub pytestCheckHook requests ]; @@ -54,7 +51,7 @@ buildPythonPackage rec { 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 ]; + license = licenses.lgpl21Only; maintainers = with maintainers; [ fab ]; }; }