1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, hatchling 6, babel 7, importlib-metadata 8, jinja2 9, json5 10, jsonschema 11, jupyter-server 12, packaging 13, requests 14, openapi-core 15, pytest-jupyter 16, pytestCheckHook 17, requests-mock 18, ruamel-yaml 19, strict-rfc3339 20}: 21 22buildPythonPackage rec { 23 pname = "jupyterlab-server"; 24 version = "2.25.1"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.8"; 28 29 src = fetchPypi { 30 pname = "jupyterlab_server"; 31 inherit version; 32 hash = "sha256-ZJEoOwAAaY6uGjjEhQeTBWDfz3RhrqABU2hpiqs03Zw="; 33 }; 34 35 postPatch = '' 36 sed -i "/timeout/d" pyproject.toml 37 ''; 38 39 nativeBuildInputs = [ 40 hatchling 41 ]; 42 43 propagatedBuildInputs = [ 44 babel 45 jinja2 46 json5 47 jsonschema 48 jupyter-server 49 packaging 50 requests 51 ] ++ lib.optionals (pythonOlder "3.10") [ 52 importlib-metadata 53 ]; 54 55 passthru.optional-dependencies = { 56 openapi = [ 57 openapi-core 58 ruamel-yaml 59 ]; 60 }; 61 62 nativeCheckInputs = [ 63 pytest-jupyter 64 pytestCheckHook 65 requests-mock 66 strict-rfc3339 67 ] ++ passthru.optional-dependencies.openapi; 68 69 preCheck = '' 70 export HOME=$(mktemp -d) 71 ''; 72 73 disabledTestPaths = [ 74 # require optional language pack packages for tests 75 "tests/test_translation_api.py" 76 ]; 77 78 pythonImportsCheck = [ 79 "jupyterlab_server" 80 "jupyterlab_server.pytest_plugin" 81 ]; 82 83 __darwinAllowLocalNetworking = true; 84 85 meta = with lib; { 86 description = "A set of server components for JupyterLab and JupyterLab like applications"; 87 homepage = "https://github.com/jupyterlab/jupyterlab_server"; 88 changelog = "https://github.com/jupyterlab/jupyterlab_server/blob/v${version}/CHANGELOG.md"; 89 license = licenses.bsd3; 90 maintainers = lib.teams.jupyter.members; 91 }; 92}