2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-08-12 12:06:08 +00:00
|
|
|
, hatchling
|
2020-04-24 23:36:52 +00:00
|
|
|
, jsonschema
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
2021-03-23 19:22:30 +00:00
|
|
|
, pytestCheckHook
|
2022-09-09 14:08:57 +00:00
|
|
|
, json5
|
2022-05-18 14:49:53 +00:00
|
|
|
, babel
|
2023-01-20 10:41:00 +00:00
|
|
|
, jupyter-server
|
2022-10-21 18:38:19 +00:00
|
|
|
, tomli
|
2021-06-28 23:13:55 +00:00
|
|
|
, openapi-core
|
2022-08-12 12:06:08 +00:00
|
|
|
, pytest-timeout
|
2021-03-23 19:22:30 +00:00
|
|
|
, pytest-tornasync
|
2021-06-28 23:13:55 +00:00
|
|
|
, ruamel-yaml
|
2022-09-09 14:08:57 +00:00
|
|
|
, importlib-metadata
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jupyterlab_server";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "2.24.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "pyproject";
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-Tm+Z4KVXm7vDLkScTbsDlWHU8aeCfVczJz7VZzjyHwc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
jsonschema
|
|
|
|
json5
|
|
|
|
babel
|
2023-01-20 10:41:00 +00:00
|
|
|
jupyter-server
|
2022-10-21 18:38:19 +00:00
|
|
|
tomli
|
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-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
openapi-core
|
2021-03-23 19:22:30 +00:00
|
|
|
pytestCheckHook
|
2022-08-12 12:06:08 +00:00
|
|
|
pytest-timeout
|
2021-03-23 19:22:30 +00:00
|
|
|
pytest-tornasync
|
2021-06-28 23:13:55 +00:00
|
|
|
ruamel-yaml
|
2021-03-23 19:22:30 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
postPatch = ''
|
|
|
|
# translation tests try to install additional packages into read only paths
|
|
|
|
rm -r tests/translations/
|
|
|
|
'';
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
# https://github.com/jupyterlab/jupyterlab_server/blob/v2.15.2/pyproject.toml#L61
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
2022-09-09 14:08:57 +00:00
|
|
|
# DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12.
|
|
|
|
# Use setuptools or check PEP 632 for potential alternatives.
|
2022-08-12 12:06:08 +00:00
|
|
|
"-W ignore::DeprecationWarning"
|
|
|
|
];
|
|
|
|
|
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";
|
2022-10-21 18:38:19 +00:00
|
|
|
homepage = "https://jupyterlab-server.readthedocs.io/";
|
|
|
|
changelog = "https://github.com/jupyterlab/jupyterlab_server/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsdOriginal;
|
2023-08-10 07:59:29 +00:00
|
|
|
maintainers = lib.teams.jupyter.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|