2017-04-18 09:36:37 +01:00
|
|
|
{ lib
|
2019-12-29 01:10:21 +00:00
|
|
|
, stdenv
|
2017-04-18 09:36:37 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-12-12 10:52:34 +00:00
|
|
|
, fetchpatch
|
2019-12-21 07:58:02 +00:00
|
|
|
, flaky
|
2017-04-18 09:36:37 +01:00
|
|
|
, ipython
|
|
|
|
, jupyter_client
|
|
|
|
, traitlets
|
|
|
|
, tornado
|
2018-11-04 02:11:11 +00:00
|
|
|
, pythonOlder
|
2019-12-29 01:05:20 +00:00
|
|
|
, pytestCheckHook
|
2018-11-04 02:11:11 +00:00
|
|
|
, nose
|
2017-04-18 09:36:37 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ipykernel";
|
2020-05-07 23:30:39 +01:00
|
|
|
version = "5.2.1";
|
2017-04-18 09:36:37 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-07 23:30:39 +01:00
|
|
|
sha256 = "1a3hr7wx3ywwskr99hgp120dw9ab1vmcaxdixlsbd9bg6ly3fdr9";
|
2017-04-18 09:36:37 +01:00
|
|
|
};
|
|
|
|
|
2018-11-04 02:11:11 +00:00
|
|
|
propagatedBuildInputs = [ ipython jupyter_client traitlets tornado ];
|
2017-04-18 09:36:37 +01:00
|
|
|
|
2018-12-12 10:52:34 +00:00
|
|
|
# https://github.com/ipython/ipykernel/pull/377
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/ipython/ipykernel/commit/a3bf849dbd368a1826deb9dfc94c2bd3e5ed04fe.patch";
|
|
|
|
sha256 = "1yhpwqixlf98a3n620z92mfips3riw6psijqnc5jgs2p58fgs2yc";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-01-04 17:00:00 +00:00
|
|
|
checkInputs = [ pytestCheckHook nose flaky ];
|
2019-12-29 01:05:20 +00:00
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
2018-11-04 02:11:11 +00:00
|
|
|
'';
|
2020-02-24 08:30:16 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin ([
|
2019-12-29 01:10:21 +00:00
|
|
|
# see https://github.com/NixOS/nixpkgs/issues/76197
|
|
|
|
"test_subprocess_print"
|
|
|
|
"test_subprocess_error"
|
|
|
|
"test_ipython_start_kernel_no_userns"
|
2020-08-25 03:07:09 +01:00
|
|
|
|
2020-05-12 00:21:27 +01:00
|
|
|
# https://github.com/ipython/ipykernel/issues/506
|
2020-08-25 03:07:09 +01:00
|
|
|
"test_unc_paths"
|
2020-02-24 08:30:16 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
# flaky test https://github.com/ipython/ipykernel/issues/485
|
|
|
|
"test_shutdown"
|
|
|
|
|
|
|
|
# test regression https://github.com/ipython/ipykernel/issues/486
|
|
|
|
"test_sys_path_profile_dir"
|
|
|
|
"test_save_history"
|
|
|
|
"test_help_output"
|
|
|
|
"test_write_kernel_spec"
|
|
|
|
"test_ipython_start_kernel_userns"
|
|
|
|
"ZMQDisplayPublisherTests"
|
|
|
|
]);
|
2017-04-18 09:36:37 +01:00
|
|
|
|
2019-09-14 20:19:09 +01:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2017-04-18 09:36:37 +01:00
|
|
|
meta = {
|
|
|
|
description = "IPython Kernel for Jupyter";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://ipython.org/";
|
2017-04-18 09:36:37 +01:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
|
|
};
|
2018-11-04 02:11:11 +00:00
|
|
|
}
|