depot/third_party/nixpkgs/pkgs/development/python-modules/pycrdt-websocket/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

80 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
anyio,
pycrdt,
sqlite-anyio,
# optional-dependencies
channels,
# tests
httpx-ws,
hypercorn,
pytest-asyncio,
pytestCheckHook,
trio,
uvicorn,
websockets,
}:
buildPythonPackage rec {
pname = "pycrdt-websocket";
version = "0.14.2";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "jupyter-server";
repo = "pycrdt-websocket";
rev = "refs/tags/v${version}";
hash = "sha256-YsAeEUFxCwu7KA2d83J/rb1IlZTQZZecHJAewh+TqWs=";
};
build-system = [ hatchling ];
dependencies = [
anyio
pycrdt
sqlite-anyio
];
optional-dependencies = {
django = [ channels ];
};
pythonImportsCheck = [ "pycrdt_websocket" ];
nativeCheckInputs = [
httpx-ws
hypercorn
pytest-asyncio
pytestCheckHook
trio
uvicorn
websockets
];
disabledTestPaths = [
# requires nodejs and installed js modules
"tests/test_pycrdt_yjs.py"
];
__darwinAllowLocalNetworking = true;
meta = {
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 = lib.licenses.mit;
maintainers = lib.teams.jupyter.members;
};
}