2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2023-11-16 04:20:00 +00:00
|
|
|
, hatchling
|
2022-05-18 14:49:53 +00:00
|
|
|
, babel
|
2023-11-16 04:20:00 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, jinja2
|
|
|
|
, json5
|
|
|
|
, jsonschema
|
2023-01-20 10:41:00 +00:00
|
|
|
, jupyter-server
|
2023-11-16 04:20:00 +00:00
|
|
|
, packaging
|
|
|
|
, requests
|
2021-06-28 23:13:55 +00:00
|
|
|
, openapi-core
|
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
|
2021-06-28 23:13:55 +00:00
|
|
|
, ruamel-yaml
|
2023-08-22 20:05:09 +00:00
|
|
|
, strict-rfc3339
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-11-16 04:20:00 +00:00
|
|
|
pname = "jupyterlab-server";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.25.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-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-vQ7HqZ687ci8/5Oe+G5Sw3jkTCcH4FP82B0EbOl57mM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/timeout/d" pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
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
|
2022-12-17 10:02:37 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
2022-10-21 18:38:19 +00:00
|
|
|
importlib-metadata
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
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
|
2023-11-16 04:20:00 +00:00
|
|
|
] ++ passthru.optional-dependencies.openapi;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|