diff --git a/pkgs/development/python-modules/pyunifiprotect/default.nix b/pkgs/development/python-modules/pyunifiprotect/default.nix index 00b0f3740c35..5d13ea6ce704 100644 --- a/pkgs/development/python-modules/pyunifiprotect/default.nix +++ b/pkgs/development/python-modules/pyunifiprotect/default.nix @@ -2,9 +2,13 @@ , aiofiles , aiohttp , aioshutil +, async-timeout , buildPythonPackage , dateparser , fetchFromGitHub +, ffmpeg +, hatch-vcs +, hatchling , ipython , orjson , packaging @@ -22,37 +26,34 @@ , python-dotenv , pythonOlder , pytz -, setuptools -, setuptools-scm , termcolor , typer -, ffmpeg }: buildPythonPackage rec { pname = "pyunifiprotect"; - version = "4.21.0"; - format = "pyproject"; + version = "4.22.0"; + pyproject = true; disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "briis"; - repo = pname; + repo = "pyunifiprotect"; rev = "refs/tags/v${version}"; - hash = "sha256-BFcICpWq0aBjEww9EuO6UH8oGX8fufernFqh/gihIrM="; + hash = "sha256-qzom1mLTfP683GCYlUav/MlOkYj+AiEe13b74ceW7gI="; }; + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + postPatch = '' substituteInPlace pyproject.toml \ - --replace "--cov=pyunifiprotect --cov-append" "" + --replace "--strict-markers -ra -Wd --ignore=.* --no-cov-on-fail --cov=pyunifiprotect --cov-append --maxfail=10 -n=auto" "" ''; - SETUPTOOLS_SCM_PRETEND_VERSION = version; - nativeBuildInputs = [ - setuptools - setuptools-scm + hatch-vcs + hatchling ]; propagatedBuildInputs = [ @@ -67,7 +68,10 @@ buildPythonPackage rec { pyjwt pytz typer - ] ++ typer.optional-dependencies.all; + ] ++ typer.optional-dependencies.all + ++ lib.optionals (pythonOlder "3.11") [ + async-timeout + ]; passthru.optional-dependencies = { shell = [