diff --git a/pkgs/development/python-modules/pysmartthings/default.nix b/pkgs/development/python-modules/pysmartthings/default.nix index dfcfeb1755c8..77dbce1895c9 100644 --- a/pkgs/development/python-modules/pysmartthings/default.nix +++ b/pkgs/development/python-modules/pysmartthings/default.nix @@ -1,40 +1,51 @@ { lib, aiohttp, + aioresponses, + aiosseclient, buildPythonPackage, fetchFromGitHub, + mashumaro, + orjson, + poetry-core, pytest-asyncio, + pytest-cov-stub, pytestCheckHook, pythonOlder, + syrupy, + yarl, }: buildPythonPackage rec { pname = "pysmartthings"; - version = "0.7.8"; - format = "setuptools"; + version = "2.5.0"; + pyproject = true; - disabled = pythonOlder "3.8"; + disabled = pythonOlder "3.12"; src = fetchFromGitHub { owner = "andrewsayre"; - repo = pname; - rev = version; - hash = "sha256-r+f2+vEXJdQGDlbs/MhraFgEmsAf32PU282blLRLjzc="; + repo = "pysmartthings"; + rev = "v${version}"; + hash = "sha256-0D0si3VBGtnQ8+kUKiquPo/IJXeBgR7SFc/1nxhiPvw="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "aiohttp>=3.8.0,<4.0.0" "aiohttp<=4.0.0" - ''; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ aiohttp ]; - - # https://github.com/andrewsayre/pysmartthings/issues/80 - doCheck = lib.versionOlder aiohttp.version "3.9.0"; + dependencies = [ + aiohttp + aiosseclient + mashumaro + orjson + yarl + ]; nativeCheckInputs = [ + aioresponses pytest-asyncio + pytest-cov-stub pytestCheckHook + syrupy ]; pythonImportsCheck = [ "pysmartthings" ]; @@ -42,7 +53,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python library for interacting with the SmartThings cloud API"; homepage = "https://github.com/andrewsayre/pysmartthings"; - changelog = "https://github.com/andrewsayre/pysmartthings/releases/tag/${version}"; + changelog = "https://github.com/andrewsayre/pysmartthings/releases/tag/v${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; };