depot/third_party/nixpkgs/pkgs/development/python-modules/notebook/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

74 lines
1.4 KiB
Nix

{
stdenv,
lib,
buildPythonPackage,
pythonOlder,
fetchPypi,
hatch-jupyter-builder,
hatchling,
jupyter-server,
jupyterlab,
jupyterlab-server,
notebook-shim,
tornado,
pytest-jupyter,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "notebook";
version = "7.2.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-Qoe22ll0CzIXPQHWQfdj0pL0nDDnpRuJxGuoRzEmNB4=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "timeout = 300" ""
'';
build-system = [
hatch-jupyter-builder
hatchling
jupyterlab
];
dependencies = [
jupyter-server
jupyterlab
jupyterlab-server
notebook-shim
tornado
];
nativeCheckInputs = [
pytest-jupyter
pytestCheckHook
];
pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];
env = {
JUPYTER_PLATFORM_DIRS = 1;
};
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;
meta = {
changelog = "https://github.com/jupyter/notebook/blob/v${version}/CHANGELOG.md";
description = "Web-based notebook environment for interactive computing";
homepage = "https://github.com/jupyter/notebook";
license = lib.licenses.bsd3;
maintainers = lib.teams.jupyter.members;
mainProgram = "jupyter-notebook";
};
}