1{ lib
2, buildPythonPackage
3, callPackage
4, fetchPypi
5, hatchling
6, pythonOlder
7, comm
8, ipython
9, jupyter-client
10, packaging
11, psutil
12, tornado
13, traitlets
14}:
15
16buildPythonPackage rec {
17 pname = "ipykernel";
18 version = "6.25.2";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-9Gjd0fF6y0jIzmf8+km6bUbU+awEOMH0Qb58PRNyIws=";
26 };
27
28 # debugpy is optional, see https://github.com/ipython/ipykernel/pull/767
29 postPatch = ''
30 sed -i "/debugpy/d" pyproject.toml
31 '';
32
33 nativeBuildInputs = [
34 hatchling
35 ];
36
37 propagatedBuildInputs = [
38 comm
39 ipython
40 jupyter-client
41 packaging
42 psutil
43 tornado
44 traitlets
45 ];
46
47 # check in passthru.tests.pytest to escape infinite recursion with ipyparallel
48 doCheck = false;
49
50 passthru.tests = {
51 pytest = callPackage ./tests.nix { };
52 };
53
54 meta = {
55 description = "IPython Kernel for Jupyter";
56 homepage = "https://ipython.org/";
57 license = lib.licenses.bsd3;
58 maintainers = with lib.maintainers; [ fridh ];
59 };
60}