2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
hatchling,
|
|
|
|
babel,
|
|
|
|
importlib-metadata,
|
|
|
|
jinja2,
|
|
|
|
json5,
|
|
|
|
jsonschema,
|
|
|
|
jupyter-server,
|
|
|
|
packaging,
|
|
|
|
requests,
|
|
|
|
openapi-core,
|
|
|
|
pytest-jupyter,
|
|
|
|
pytestCheckHook,
|
|
|
|
requests-mock,
|
|
|
|
ruamel-yaml,
|
|
|
|
strict-rfc3339,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-11-16 04:20:00 +00:00
|
|
|
pname = "jupyterlab-server";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2.27.2";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2023-11-16 04:20:00 +00:00
|
|
|
pname = "jupyterlab_server";
|
|
|
|
inherit version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-FcuzSdxF6VTgm6z4G5+byxCBX/Zg+yA07NdBfbOn6ic=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/timeout/d" pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ hatchling ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2022-09-09 14:08:57 +00:00
|
|
|
babel
|
2023-11-16 04:20:00 +00:00
|
|
|
jinja2
|
|
|
|
json5
|
|
|
|
jsonschema
|
2023-01-20 10:41:00 +00:00
|
|
|
jupyter-server
|
2023-11-16 04:20:00 +00:00
|
|
|
packaging
|
|
|
|
requests
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
optional-dependencies = {
|
2023-11-16 04:20:00 +00:00
|
|
|
openapi = [
|
|
|
|
openapi-core
|
|
|
|
ruamel-yaml
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
pytest-jupyter
|
2023-11-16 04:20:00 +00:00
|
|
|
pytestCheckHook
|
2023-08-22 20:05:09 +00:00
|
|
|
requests-mock
|
|
|
|
strict-rfc3339
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ optional-dependencies.openapi;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pytestFlagsArray = [
|
2024-06-05 15:53:02 +00:00
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
2024-04-21 15:54:59 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabledTestPaths = [
|
2023-11-16 04:20:00 +00:00
|
|
|
# require optional language pack packages for tests
|
2023-08-22 20:05:09 +00:00
|
|
|
"tests/test_translation_api.py"
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"jupyterlab_server"
|
|
|
|
"jupyterlab_server.pytest_plugin"
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-09-09 14:08:57 +00:00
|
|
|
description = "A set of server components for JupyterLab and JupyterLab like applications";
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://github.com/jupyterlab/jupyterlab_server";
|
2022-10-21 18:38:19 +00:00
|
|
|
changelog = "https://github.com/jupyterlab/jupyterlab_server/blob/v${version}/CHANGELOG.md";
|
2023-11-16 04:20:00 +00:00
|
|
|
license = licenses.bsd3;
|
2023-08-10 07:59:29 +00:00
|
|
|
maintainers = lib.teams.jupyter.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|