From d88f472124142f67fc6d4ba9ecccc679a617dd28 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 4 Jun 2022 10:56:05 +0000 Subject: [PATCH 1/2] python310Packages.pyunifiprotect: 3.7.0 -> 3.8.0 --- pkgs/development/python-modules/pyunifiprotect/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyunifiprotect/default.nix b/pkgs/development/python-modules/pyunifiprotect/default.nix index be333ee9d045..e94e58d389f4 100644 --- a/pkgs/development/python-modules/pyunifiprotect/default.nix +++ b/pkgs/development/python-modules/pyunifiprotect/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "pyunifiprotect"; - version = "3.7.0"; + version = "3.8.0"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -30,8 +30,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "briis"; repo = pname; - rev = "v${version}"; - hash = "sha256-0adbUKTkbgA4pKrIVFGowD4Wf8brjfkLpfCT/+Mw6vs="; + rev = "refs/tags/v${version}"; + hash = "sha256-YFdGWGm+DUi/0l9YBliQH1VgpYEVcHVgLirJTrNmNP4="; }; propagatedBuildInputs = [ From a9853d7a0a201828413c4e354bfdfc099ba62c07 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Jun 2022 13:15:12 +0200 Subject: [PATCH 2/2] 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" "" '';