2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchPypi,
|
|
|
|
hatch-jupyter-builder,
|
|
|
|
hatchling,
|
|
|
|
jupyter-server,
|
|
|
|
jupyterlab,
|
|
|
|
jupyterlab-server,
|
|
|
|
notebook-shim,
|
|
|
|
tornado,
|
|
|
|
pytest-jupyter,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notebook";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "7.2.0";
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-NKK6SwitXRnskw23SE+3l0aheEvp4aX4IY+a+GVqFB8=";
|
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
|
2023-11-16 04:20:00 +00:00
|
|
|
jupyterlab-server
|
2023-08-10 07:59:29 +00:00
|
|
|
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 = [
|
2024-06-05 15:53:02 +00:00
|
|
|
"-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
|
|
|
};
|
|
|
|
}
|