diff --git a/pkgs/development/python-modules/realtime/default.nix b/pkgs/development/python-modules/realtime/default.nix new file mode 100644 index 000000000000..cf41f0df81f8 --- /dev/null +++ b/pkgs/development/python-modules/realtime/default.nix @@ -0,0 +1,57 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + python-dateutil, + typing-extensions, + websockets, + aiohttp, + pytestCheckHook, + python-dotenv, +}: + +buildPythonPackage rec { + pname = "realtime-py"; + version = "2.5.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "supabase"; + repo = "realtime-py"; + rev = "v${version}"; + hash = "sha256-NFxWcnt/zpgDehacqK7QlXhmjrh6JoA6xh+sFjD/tt0="; + }; + + dependencies = [ + python-dateutil + typing-extensions + websockets + aiohttp + ]; + + pythonRelaxDeps = [ + "websockets" + "aiohttp" + "typing-extensions" + ]; + + # Can't run all the tests due to infinite loop in pytest-asyncio + nativeBuildInputs = [ + pytestCheckHook + python-dotenv + ]; + + pythonImportsCheck = [ "realtime" ]; + + build-system = [ poetry-core ]; + + doCheck = false; + + meta = { + homepage = "https://github.com/supabase/realtime-py"; + license = lib.licenses.mit; + description = "Python Realtime Client for Supabase"; + maintainers = with lib.maintainers; [ siegema ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 284c00c4b83a..3640d4391b54 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15423,6 +15423,8 @@ self: super: with self; { readthedocs-sphinx-ext = callPackage ../development/python-modules/readthedocs-sphinx-ext { }; + realtime = callPackage ../development/python-modules/realtime { }; + rebulk = callPackage ../development/python-modules/rebulk { }; recipe-scrapers = callPackage ../development/python-modules/recipe-scrapers { };