at 24.05-pre 125 lines 2.6 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, pythonOlder 6, hatch-jupyter-builder 7, hatchling 8, pytestCheckHook 9, pytest-console-scripts 10, pytest-jupyter 11, pytest-timeout 12, argon2-cffi 13, jinja2 14, tornado 15, pyzmq 16, ipykernel 17, traitlets 18, jupyter-core 19, jupyter-client 20, jupyter-events 21, jupyter-server-terminals 22, nbformat 23, nbconvert 24, packaging 25, send2trash 26, terminado 27, prometheus-client 28, anyio 29, websocket-client 30, overrides 31, requests 32, flaky 33}: 34 35buildPythonPackage rec { 36 pname = "jupyter-server"; 37 version = "2.7.3"; 38 format = "pyproject"; 39 disabled = pythonOlder "3.8"; 40 41 src = fetchPypi { 42 pname = "jupyter_server"; 43 inherit version; 44 hash = "sha256-1JFshYHE67xTTOvaqOyiR42fO/3Yjq4p/KsBIOrFdkk="; 45 }; 46 47 nativeBuildInputs = [ 48 hatch-jupyter-builder 49 hatchling 50 ]; 51 52 propagatedBuildInputs = [ 53 argon2-cffi 54 jinja2 55 tornado 56 pyzmq 57 traitlets 58 jupyter-core 59 jupyter-client 60 jupyter-events 61 jupyter-server-terminals 62 nbformat 63 nbconvert 64 packaging 65 send2trash 66 terminado 67 prometheus-client 68 anyio 69 websocket-client 70 overrides 71 ]; 72 73 nativeCheckInputs = [ 74 ipykernel 75 pytestCheckHook 76 pytest-console-scripts 77 pytest-jupyter 78 pytest-timeout 79 requests 80 flaky 81 ]; 82 83 pytestFlagsArray = [ 84 "-W" "ignore::DeprecationWarning" 85 ]; 86 87 preCheck = '' 88 export HOME=$(mktemp -d) 89 export PATH=$out/bin:$PATH 90 ''; 91 92 disabledTests = [ 93 "test_server_extension_list" 94 "test_cull_idle" 95 "test_server_extension_list" 96 ] ++ lib.optionals stdenv.isDarwin [ 97 # attempts to use trashcan, build env doesn't allow this 98 "test_delete" 99 # test is presumable broken in sandbox 100 "test_authorized_requests" 101 # Insufficient access privileges for operation 102 "test_regression_is_hidden" 103 ] ++ lib.optionals stdenv.isLinux [ 104 # Failed: DID NOT RAISE <class 'tornado.web.HTTPError'> 105 "test_copy_big_dir" 106 ]; 107 108 disabledTestPaths = [ 109 "tests/services/kernels/test_api.py" 110 "tests/services/sessions/test_api.py" 111 # nbconvert failed: `relax_add_props` kwargs of validate has been 112 # deprecated for security reasons, and will be removed soon. 113 "tests/nbconvert/test_handlers.py" 114 ]; 115 116 __darwinAllowLocalNetworking = true; 117 118 meta = with lib; { 119 changelog = "https://github.com/jupyter-server/jupyter_server/blob/v${version}/CHANGELOG.md"; 120 description = "The backendi.e. core services, APIs, and REST endpointsto Jupyter web applications"; 121 homepage = "https://github.com/jupyter-server/jupyter_server"; 122 license = licenses.bsdOriginal; 123 maintainers = lib.teams.jupyter.members; 124 }; 125}