summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/realtime/default.nix
blob: 66ee2e1fb5c2af46acfbbbb7d7bc8ef8a88c43e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  pydantic,
  typing-extensions,
  websockets,
  aiohttp,
  pytest-asyncio,
  pytestCheckHook,
  python-dotenv,
}:

buildPythonPackage rec {
  pname = "realtime-py";
  version = "2.7.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "supabase";
    repo = "realtime-py";
    tag = "v${version}";
    hash = "sha256-cWWgVs+ZNRvBje3kuDQS5L5utkY3z7MluGFNmjf9LFc=";
  };

  dependencies = [
    pydantic
    typing-extensions
    websockets
  ];

  pythonRelaxDeps = [
    "websockets"
  ];

  nativeCheckInputs = [
    aiohttp
    pytest-asyncio
    pytestCheckHook
    python-dotenv
  ];

  pythonImportsCheck = [ "realtime" ];

  build-system = [ poetry-core ];

  # requires running Supabase
  doCheck = false;

  meta = {
    changelog = "https://github.com/supabase/realtime-py/blob/${src.tag}/CHANGELOG.md";
    homepage = "https://github.com/supabase/realtime-py";
    license = lib.licenses.mit;
    description = "Python Realtime Client for Supabase";
    maintainers = with lib.maintainers; [ siegema ];
  };
}