diff --git a/pkgs/development/python-modules/aioswitcher/default.nix b/pkgs/development/python-modules/aioswitcher/default.nix new file mode 100644 index 00000000000..115da7dfca4 --- /dev/null +++ b/pkgs/development/python-modules/aioswitcher/default.nix @@ -0,0 +1,45 @@ +{ lib +, aiohttp +, asynctest +, buildPythonPackage +, fetchFromGitHub +, poetry +, pytest-aiohttp +, pytest-asyncio +, pytest-sugar +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "aioswitcher"; + version = "1.2.2"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "TomerFi"; + repo = pname; + rev = version; + sha256 = "0wvca1jbyj4bwrpkpklbxnkvdp9zs7mrvg5b9vkx2hpyr81vyxam"; + }; + + nativeBuildInputs = [ poetry ]; + + propagatedBuildInputs = [ aiohttp ]; + + checkInputs = [ + asynctest + pytest-aiohttp + pytest-asyncio + pytest-sugar + pytestCheckHook + ]; + + pythonImportsCheck = [ "aioswitcher" ]; + + meta = with lib; { + description = "Python module to interact with Switcher water heater"; + homepage = "https://github.com/TomerFi/aioswitcher"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4ca774dcd46..873bb8381d6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -272,6 +272,8 @@ in { aiostream = callPackage ../development/python-modules/aiostream { }; + aioswitcher = callPackage ../development/python-modules/aioswitcher { }; + aiounifi = callPackage ../development/python-modules/aiounifi { }; aiounittest = callPackage ../development/python-modules/aiounittest { };