diff --git a/pkgs/development/python-modules/simplisafe-python/default.nix b/pkgs/development/python-modules/simplisafe-python/default.nix new file mode 100644 index 000000000000..5b8925b0a4c6 --- /dev/null +++ b/pkgs/development/python-modules/simplisafe-python/default.nix @@ -0,0 +1,61 @@ +{ lib +, aiohttp +, aresponses +, asynctest +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytest-cov +, pytestCheckHook +, python-engineio +, python-socketio +, pythonOlder +, pytz +, voluptuous +, websockets +}: + +buildPythonPackage rec { + pname = "simplisafe-python"; + version = "9.6.9"; + format = "pyproject"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "1q5w5pvrgj94bzd5wig79l4hipkfrcdah54rvwyi7b8q46gw77sg"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + aiohttp + python-engineio + python-socketio + pytz + voluptuous + websockets + ]; + + checkInputs = [ + aresponses + asynctest + pytest-asyncio + pytest-cov + pytestCheckHook + ]; + + disabledTestPaths = [ "examples/" ]; + + pythonImportsCheck = [ "simplipy" ]; + + meta = with lib; { + description = "Python library the SimpliSafe API"; + homepage = "https://simplisafe-python.readthedocs.io/"; + 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 3f3f3278e7a5..3b1634921cc8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7631,6 +7631,8 @@ in { simple-websocket-server = callPackage ../development/python-modules/simple-websocket-server { }; + simplisafe-python = callPackage ../development/python-modules/simplisafe-python { }; + simpy = callPackage ../development/python-modules/simpy { }; singledispatch = callPackage ../development/python-modules/singledispatch { };