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