2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
callPackage,
|
|
|
|
fetchPypi,
|
|
|
|
hatchling,
|
|
|
|
pythonOlder,
|
|
|
|
appnope,
|
|
|
|
comm,
|
|
|
|
debugpy,
|
|
|
|
ipython,
|
|
|
|
jupyter-client,
|
|
|
|
jupyter-core,
|
|
|
|
matplotlib-inline,
|
|
|
|
nest-asyncio,
|
|
|
|
packaging,
|
|
|
|
psutil,
|
|
|
|
pyzmq,
|
|
|
|
tornado,
|
|
|
|
traitlets,
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# Reverse dependency
|
|
|
|
sage,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ipykernel";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "6.29.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-PUQHAGD5R1rCCSt2ASP63xBdLiSTwkhItmkafE9Cr1w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
# debugpy is optional, see https://github.com/ipython/ipykernel/pull/767
|
|
|
|
postPatch = ''
|
2022-08-12 12:06:08 +00:00
|
|
|
sed -i "/debugpy/d" pyproject.toml
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
comm
|
2024-01-02 11:29:13 +00:00
|
|
|
debugpy
|
2021-09-18 10:52:07 +00:00
|
|
|
ipython
|
2021-10-28 06:52:43 +00:00
|
|
|
jupyter-client
|
2024-01-02 11:29:13 +00:00
|
|
|
jupyter-core
|
|
|
|
matplotlib-inline
|
|
|
|
nest-asyncio
|
2022-04-27 09:35:20 +00:00
|
|
|
packaging
|
|
|
|
psutil
|
2024-01-02 11:29:13 +00:00
|
|
|
pyzmq
|
2021-09-18 10:52:07 +00:00
|
|
|
tornado
|
|
|
|
traitlets
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ appnope ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# check in passthru.tests.pytest to escape infinite recursion with ipyparallel
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
passthru.tests = {
|
|
|
|
pytest = callPackage ./tests.nix { };
|
2024-05-15 15:35:15 +00:00
|
|
|
inherit sage;
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "IPython Kernel for Jupyter";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://ipython.org/";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/ipython/ipykernel/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = lib.teams.jupyter.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|