depot/third_party/nixpkgs/pkgs/development/python-modules/jupyter-collaboration/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

80 lines
1.5 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, hatch-jupyter-builder
, hatch-nodejs-version
, hatchling
, jsonschema
, jupyter-events
, jupyter-server
, jupyter-server-fileid
, jupyter-ydoc
, jupyterlab
, pycrdt-websocket
, pytest-jupyter
, pytestCheckHook
, websockets
}:
buildPythonPackage rec {
pname = "jupyter-collaboration";
version = "2.0.2";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
pname = "jupyter_collaboration";
inherit version;
hash = "sha256-EpWFsVWCi/6IOuM/zgPIer3arMDGjPPxhm/tZC4aji4=";
};
postPatch = ''
sed -i "/^timeout/d" pyproject.toml
'';
nativeBuildInputs = [
hatch-jupyter-builder
hatch-nodejs-version
hatchling
jupyterlab
];
propagatedBuildInputs = [
jsonschema
jupyter-events
jupyter-server
jupyter-server-fileid
jupyter-ydoc
pycrdt-websocket
];
nativeCheckInputs = [
pytest-jupyter
pytestCheckHook
websockets
];
pythonImportsCheck = [
"jupyter_collaboration"
];
pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];
preCheck = ''
export HOME=$TEMP
'';
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "JupyterLab Extension enabling Real-Time Collaboration";
homepage = "https://github.com/jupyterlab/jupyter_collaboration";
changelog = "https://github.com/jupyterlab/jupyter_collaboration/blob/v${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = teams.jupyter.members;
};
}