1{ lib 2, stdenv 3, buildPythonPackage 4, fetchpatch 5, fetchPypi 6, pythonOlder 7, pytestCheckHook 8, pytest-tornasync 9, argon2_cffi 10, jinja2 11, tornado 12, pyzmq 13, ipython_genutils 14, traitlets 15, jupyter_core 16, jupyter-client 17, nbformat 18, nbconvert 19, send2trash 20, terminado 21, prometheus-client 22, anyio 23, websocket-client 24, requests 25, requests-unixsocket 26}: 27 28buildPythonPackage rec { 29 pname = "jupyter_server"; 30 version = "1.11.2"; 31 disabled = pythonOlder "3.6"; 32 33 src = fetchPypi { 34 inherit pname version; 35 sha256 = "c1f32e0c1807ab2de37bf70af97a36b4436db0bc8af3124632b1f4441038bf95"; 36 }; 37 38 patches = [ (fetchpatch 39 { name = "Normalize-file-name-and-path.patch"; 40 url = "https://github.com/jupyter-server/jupyter_server/pull/608/commits/345e26cdfd78651954b68708fa44119c2ac0dbd5.patch"; 41 sha256 = "1kqz3dyh2w0h1g1fbvqa13q17hb6y32694rlaasyg213mq6g4k32"; 42 }) 43 ]; 44 45 propagatedBuildInputs = [ 46 argon2_cffi 47 jinja2 48 tornado 49 pyzmq 50 ipython_genutils 51 traitlets 52 jupyter_core 53 jupyter-client 54 nbformat 55 nbconvert 56 send2trash 57 terminado 58 prometheus-client 59 anyio 60 websocket-client 61 requests-unixsocket 62 ]; 63 64 checkInputs = [ 65 pytestCheckHook 66 pytest-tornasync 67 requests 68 ]; 69 70 preCheck = '' 71 export HOME=$(mktemp -d) 72 export PATH=$out/bin:$PATH 73 ''; 74 75 pytestFlagsArray = [ "jupyter_server" ]; 76 77 # disabled failing tests 78 disabledTests = [ 79 "test_server_extension_list" 80 "test_list_formats" 81 "test_base_url" 82 "test_culling" 83 ] ++ lib.optionals stdenv.isDarwin [ 84 # attempts to use trashcan, build env doesn't allow this 85 "test_delete" 86 ]; 87 88 __darwinAllowLocalNetworking = true; 89 90 meta = with lib; { 91 description = "The backendi.e. core services, APIs, and REST endpointsto Jupyter web applications"; 92 homepage = "https://github.com/jupyter-server/jupyter_server"; 93 license = licenses.bsdOriginal; 94 maintainers = [ maintainers.elohmeier ]; 95 }; 96}