2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
hatch-nodejs-version,
|
|
|
|
hatchling,
|
|
|
|
importlib-metadata,
|
|
|
|
pycrdt,
|
|
|
|
pytestCheckHook,
|
|
|
|
websockets,
|
|
|
|
ypy-websocket,
|
2023-03-15 16:39:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jupyter-ydoc";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.0.1";
|
|
|
|
pyproject = true;
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "jupyter_ydoc";
|
|
|
|
inherit version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-cW3ajLiviB/sL7yIrqP7DTuyS764Cpmor/LgHQidWw0=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hatch-nodejs-version
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ pycrdt ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "jupyter_ydoc" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
websockets
|
|
|
|
ypy-websocket
|
|
|
|
];
|
|
|
|
|
|
|
|
# requires a Node.js environment
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/jupyter-server/jupyter_ydoc/blob/v${version}/CHANGELOG.md";
|
|
|
|
description = "Document structures for collaborative editing using Ypy";
|
|
|
|
homepage = "https://github.com/jupyter-server/jupyter_ydoc";
|
|
|
|
license = lib.licenses.bsd3;
|
2023-08-10 07:59:29 +00:00
|
|
|
maintainers = lib.teams.jupyter.members;
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
}
|