diff options
Diffstat (limited to 'pkgs/development/python-modules/pycrdt-websocket/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pycrdt-websocket/default.nix | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pycrdt-websocket/default.nix b/pkgs/development/python-modules/pycrdt-websocket/default.nix new file mode 100644 index 0000000000000..4ed22901637e6 --- /dev/null +++ b/pkgs/development/python-modules/pycrdt-websocket/default.nix @@ -0,0 +1,71 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, hatchling +, aiosqlite +, anyio +, channels +, pycrdt +, pytest-asyncio +, pytestCheckHook +, uvicorn +, websockets +}: + +buildPythonPackage rec { + pname = "pycrdt-websocket"; + version = "0.12.6"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "jupyter-server"; + repo = "pycrdt-websocket"; + rev = "refs/tags/v${version}"; + hash = "sha256-VYD1OrerqwzjaT1Eb6q+kryf15iHCMSHJZbon225bio="; + }; + + nativeBuildInputs = [ + hatchling + ]; + + propagatedBuildInputs = [ + aiosqlite + anyio + pycrdt + ]; + + passthru.optional-dependencies = { + django = [ + channels + ]; + }; + + pythonImportsCheck = [ + "pycrdt_websocket" + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + uvicorn + websockets + ]; + + disabledTestPaths = [ + # requires nodejs and installed js modules + "tests/test_pycrdt_yjs.py" + ]; + + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "WebSocket Connector for pycrdt"; + homepage = "https://github.com/jupyter-server/pycrdt-websocket"; + changelog = "https://github.com/jupyter-server/pycrdt-websocket/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = teams.jupyter.members; + }; +} |