1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 callPackage, 6 fetchPypi, 7 hatchling, 8 pythonOlder, 9 appnope, 10 comm, 11 ipython, 12 jupyter-client, 13 jupyter-core, 14 matplotlib-inline, 15 nest-asyncio, 16 packaging, 17 psutil, 18 pyzmq, 19 tornado, 20 traitlets, 21 22 # Reverse dependency 23 sage, 24}: 25 26buildPythonPackage rec { 27 pname = "ipykernel"; 28 version = "6.29.5"; 29 pyproject = true; 30 31 disabled = pythonOlder "3.8"; 32 33 src = fetchPypi { 34 inherit pname version; 35 hash = "sha256-8JOiLEpA+IKPjjMKnCl8uT3KsTvZZ43tbejlz4HFYhU="; 36 }; 37 38 # debugpy is optional, see https://github.com/ipython/ipykernel/pull/767 39 pythonRemoveDeps = [ "debugpy" ]; 40 41 nativeBuildInputs = [ hatchling ]; 42 43 propagatedBuildInputs = [ 44 comm 45 ipython 46 jupyter-client 47 jupyter-core 48 matplotlib-inline 49 nest-asyncio 50 packaging 51 psutil 52 pyzmq 53 tornado 54 traitlets 55 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ appnope ]; 56 57 # check in passthru.tests.pytest to escape infinite recursion with ipyparallel 58 doCheck = false; 59 60 passthru.tests = { 61 pytest = callPackage ./tests.nix { }; 62 inherit sage; 63 }; 64 65 meta = { 66 description = "IPython Kernel for Jupyter"; 67 homepage = "https://ipython.org/"; 68 changelog = "https://github.com/ipython/ipykernel/releases/tag/v${version}"; 69 license = lib.licenses.bsd3; 70 teams = [ lib.teams.jupyter ]; 71 }; 72}