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";
|
2019-12-21 07:58:02 +00:00
|
|
|
version = "5.1.3";
|
2018-11-04 02:11:11 +00:00
|
|
|
disabled = pythonOlder "3.4";
|
2017-04-18 09:36:37 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-12-21 07:58:02 +00:00
|
|
|
sha256 = "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k";
|
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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-12-29 01:05:20 +00:00
|
|
|
checkInputs = [ pytestCheckHook nose ];
|
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
2018-11-04 02:11:11 +00:00
|
|
|
'';
|
2019-12-29 01:10:21 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
# see https://github.com/NixOS/nixpkgs/issues/76197
|
|
|
|
"test_subprocess_print"
|
|
|
|
"test_subprocess_error"
|
|
|
|
"test_ipython_start_kernel_no_userns"
|
|
|
|
];
|
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";
|
|
|
|
homepage = http://ipython.org/;
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
|
|
};
|
2018-11-04 02:11:11 +00:00
|
|
|
}
|