Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / notebook / default.nix
blob88f4c975a85884c9b533b633f6bbdc2eeda3db33
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
17 buildPythonPackage rec {
18   pname = "notebook";
19   version = "7.0.3";
20   disabled = pythonOlder "3.8";
22   format = "pyproject";
24   src = fetchPypi {
25     inherit pname version;
26     hash = "sha256-B/PFBi/Q5uaYZEN6A0erxIXZkaroepLEfWWWmfVxtyk=";
27   };
29   postPatch = ''
30     substituteInPlace pyproject.toml \
31       --replace "timeout = 300" ""
32   '';
34   nativeBuildInputs = [
35     hatch-jupyter-builder
36     hatchling
37     jupyterlab
38   ];
40   propagatedBuildInputs = [
41     jupyter-server
42     jupyterlab
43     jupyterlab-server
44     notebook-shim
45     tornado
46   ];
48   nativeCheckInputs = [
49     pytest-jupyter
50     pytestCheckHook
51   ];
53   pytestFlagsArray = [
54     "-W" "ignore::DeprecationWarning"
55   ];
57   env = {
58     JUPYTER_PLATFORM_DIRS = 1;
59   };
61   # Some of the tests use localhost networking.
62   __darwinAllowLocalNetworking = true;
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   };