Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / jupyter_server / default.nix
bloba9f98781b4fba7885adc9761d01fb21adcf11a94
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , pythonOlder
5 , pytestCheckHook
6 , pytest-tornasync
7 , jinja2
8 , tornado
9 , pyzmq
10 , ipython_genutils
11 , traitlets
12 , jupyter_core
13 , jupyter_client
14 , nbformat
15 , nbconvert
16 , send2trash
17 , terminado
18 , prometheus_client
19 , anyio
20 , requests
23 buildPythonPackage rec {
24   pname = "jupyter_server";
25   version = "1.4.1";
26   disabled = pythonOlder "3.6";
28   src = fetchPypi {
29     inherit pname version;
30     sha256 = "sha256-sBJvI39nlTPuxGJEz8ZtYeOh+OwPrS1HNS+hnT51Tkc=";
31   };
33   postPatch = ''
34     substituteInPlace setup.py \
35       --replace "anyio>=2.0.2" "anyio"
36   '';
38   propagatedBuildInputs = [
39     jinja2
40     tornado
41     pyzmq
42     ipython_genutils
43     traitlets
44     jupyter_core
45     jupyter_client
46     nbformat
47     nbconvert
48     send2trash
49     terminado
50     prometheus_client
51     anyio
52   ];
54   checkInputs = [
55     pytestCheckHook
56     pytest-tornasync
57     requests
58   ];
60   preCheck = ''
61     export HOME=$(mktemp -d)
62   '';
64   pytestFlagsArray = [ "jupyter_server/tests/" ];
66   # disabled failing tests
67   disabledTests = [ "test_server_extension_list" "test_list_formats" "test_base_url" ];
69   meta = with lib; {
70     description = "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.";
71     homepage = "https://github.com/jupyter-server/jupyter_server";
72     license = licenses.bsdOriginal;
73     maintainers = [ maintainers.elohmeier ];
74   };