From 5ae1c67cd17553f4faab1eb109e374c173a62051 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 6 Feb 2024 10:15:40 +0100 Subject: [PATCH] python311Packages.nats-py: refactor --- .../python-modules/nats-py/default.nix | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/nats-py/default.nix b/pkgs/development/python-modules/nats-py/default.nix index 6869bb18d67c..3c384b8c5784 100644 --- a/pkgs/development/python-modules/nats-py/default.nix +++ b/pkgs/development/python-modules/nats-py/default.nix @@ -5,6 +5,7 @@ , ed25519 , fetchFromGitHub , nats-server +, nkeys , pytestCheckHook , pythonOlder , setuptools @@ -14,7 +15,7 @@ buildPythonPackage rec { pname = "nats-py"; version = "2.7.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -25,20 +26,26 @@ buildPythonPackage rec { hash = "sha256-spKz0rKTI8hWdO6r8VLtP3G8tS9ANsjYRbinXOARCOQ="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace '"--cov=nats", "--cov-report=html"' "" - ''; - nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ - aiohttp ed25519 ]; + passthru.optional-dependencies = { + aiohttp = [ + aiohttp + ]; + nkeys = [ + nkeys + ]; + # fast_parse = [ + # fast-mail-parser + # ]; + }; + nativeCheckInputs = [ nats-server pytestCheckHook