From a9853d7a0a201828413c4e354bfdfc099ba62c07 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Jun 2022 13:15:12 +0200 Subject: [PATCH] python310Packages.pyunifiprotect: handle optional dependencies --- .../python-modules/pyunifiprotect/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pyunifiprotect/default.nix b/pkgs/development/python-modules/pyunifiprotect/default.nix index e94e58d389f4..ed8621bcf3f5 100644 --- a/pkgs/development/python-modules/pyunifiprotect/default.nix +++ b/pkgs/development/python-modules/pyunifiprotect/default.nix @@ -3,6 +3,7 @@ , aioshutil , buildPythonPackage , fetchFromGitHub +, ipython , packaging , pillow , poetry-core @@ -17,6 +18,7 @@ , python-dotenv , pythonOlder , pytz +, termcolor , typer }: @@ -41,11 +43,18 @@ buildPythonPackage rec { pillow pydantic pyjwt - python-dotenv pytz typer ]; + passthru.optional-dependencies = { + shell = [ + ipython + python-dotenv + termcolor + ]; + }; + checkInputs = [ pytest-aiohttp pytest-asyncio @@ -56,9 +65,6 @@ buildPythonPackage rec { ]; postPatch = '' - # https://github.com/briis/pyunifiprotect/pull/176 - substituteInPlace setup.cfg \ - --replace "asyncio" "aiohttp" substituteInPlace pyproject.toml \ --replace "--cov=pyunifiprotect --cov-append" "" '';