1{ stdenv 2, lib 3, buildPythonPackage 4, pythonOlder 5, fetchPypi 6, hatch-jupyter-builder 7, hatchling 8, jupyter-server 9, jupyterlab 10, jupyterlab-server 11, notebook-shim 12, tornado 13, pytest-jupyter 14, pytestCheckHook 15}: 16 17buildPythonPackage rec { 18 pname = "notebook"; 19 version = "7.0.3"; 20 disabled = pythonOlder "3.8"; 21 22 format = "pyproject"; 23 24 src = fetchPypi { 25 inherit pname version; 26 hash = "sha256-B/PFBi/Q5uaYZEN6A0erxIXZkaroepLEfWWWmfVxtyk="; 27 }; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml \ 31 --replace "timeout = 300" "" 32 ''; 33 34 nativeBuildInputs = [ 35 hatch-jupyter-builder 36 hatchling 37 jupyterlab 38 ]; 39 40 propagatedBuildInputs = [ 41 jupyter-server 42 jupyterlab 43 jupyterlab-server 44 notebook-shim 45 tornado 46 ]; 47 48 nativeCheckInputs = [ 49 pytest-jupyter 50 pytestCheckHook 51 ]; 52 53 pytestFlagsArray = [ 54 "-W" "ignore::DeprecationWarning" 55 ]; 56 57 env = { 58 JUPYTER_PLATFORM_DIRS = 1; 59 }; 60 61 # Some of the tests use localhost networking. 62 __darwinAllowLocalNetworking = true; 63 64 meta = { 65 changelog = "https://github.com/jupyter/notebook/blob/v${version}/CHANGELOG.md"; 66 description = "Web-based notebook environment for interactive computing"; 67 homepage = "https://github.com/jupyter/notebook"; 68 license = lib.licenses.bsd3; 69 maintainers = lib.teams.jupyter.members; 70 mainProgram = "jupyter-notebook"; 71 }; 72}