2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
2023-01-20 10:41:00 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2023-08-10 07:59:29 +00:00
|
|
|
, hatch-jupyter-builder
|
|
|
|
, hatchling
|
|
|
|
, jupyter-server
|
|
|
|
, jupyterlab
|
|
|
|
, jupyterlab_server
|
|
|
|
, notebook-shim
|
2020-04-24 23:36:52 +00:00
|
|
|
, tornado
|
2023-08-10 07:59:29 +00:00
|
|
|
, pytest-jupyter
|
2020-09-25 04:45:31 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notebook";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "7.0.1";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-LhatTmPqiffvviEu58FpP8+lq1X/73UEdTD3SvS9kmw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "timeout = 300" ""
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatch-jupyter-builder
|
|
|
|
hatchling
|
|
|
|
jupyterlab
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-08-10 07:59:29 +00:00
|
|
|
jupyter-server
|
|
|
|
jupyterlab
|
|
|
|
jupyterlab_server
|
|
|
|
notebook-shim
|
2023-05-24 13:37:59 +00:00
|
|
|
tornado
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-jupyter
|
|
|
|
pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-W" "ignore::DeprecationWarning"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
env = {
|
|
|
|
JUPYTER_PLATFORM_DIRS = 1;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = {
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/jupyter/notebook/blob/v${version}/CHANGELOG.md";
|
|
|
|
description = "Web-based notebook environment for interactive computing";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/jupyter/notebook";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2023-08-10 07:59:29 +00:00
|
|
|
maintainers = lib.teams.jupyter.members;
|
2023-05-24 13:37:59 +00:00
|
|
|
mainProgram = "jupyter-notebook";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|