Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, hatchling 5, jsonschema 6, pythonOlder 7, requests 8, pytestCheckHook 9, json5 10, babel 11, jupyter-server 12, tomli 13, openapi-core 14, pytest-timeout 15, pytest-tornasync 16, ruamel-yaml 17, importlib-metadata 18}: 19 20buildPythonPackage rec { 21 pname = "jupyterlab_server"; 22 version = "2.19.0"; 23 format = "pyproject"; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchPypi { 28 inherit pname version; 29 hash = "sha256-muwhohg7vt2fkahmKDVUSVdfGGLYiyitX5BQGdMebCE="; 30 }; 31 32 nativeBuildInputs = [ 33 hatchling 34 ]; 35 36 propagatedBuildInputs = [ 37 requests 38 jsonschema 39 json5 40 babel 41 jupyter-server 42 tomli 43 ] ++ lib.optionals (pythonOlder "3.10") [ 44 importlib-metadata 45 ]; 46 47 nativeCheckInputs = [ 48 openapi-core 49 pytestCheckHook 50 pytest-timeout 51 pytest-tornasync 52 ruamel-yaml 53 ]; 54 55 postPatch = '' 56 # translation tests try to install additional packages into read only paths 57 rm -r tests/translations/ 58 ''; 59 60 # https://github.com/jupyterlab/jupyterlab_server/blob/v2.15.2/pyproject.toml#L61 61 doCheck = false; 62 63 preCheck = '' 64 export HOME=$(mktemp -d) 65 ''; 66 67 pytestFlagsArray = [ 68 # DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. 69 # Use setuptools or check PEP 632 for potential alternatives. 70 "-W ignore::DeprecationWarning" 71 ]; 72 73 __darwinAllowLocalNetworking = true; 74 75 meta = with lib; { 76 description = "A set of server components for JupyterLab and JupyterLab like applications"; 77 homepage = "https://jupyterlab-server.readthedocs.io/"; 78 changelog = "https://github.com/jupyterlab/jupyterlab_server/blob/v${version}/CHANGELOG.md"; 79 license = licenses.bsdOriginal; 80 maintainers = with maintainers; [ costrouc ]; 81 }; 82}