2017-06-02 16:05:29 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-11-29 23:01:04 +00:00
|
|
|
, pytestCheckHook
|
2017-10-23 13:53:43 +01:00
|
|
|
, glibcLocales
|
2017-06-02 16:05:29 +01:00
|
|
|
, entrypoints
|
|
|
|
, bleach
|
|
|
|
, mistune
|
2020-11-29 23:01:04 +00:00
|
|
|
, nbclient
|
2017-06-02 16:05:29 +01:00
|
|
|
, jinja2
|
|
|
|
, pygments
|
|
|
|
, traitlets
|
|
|
|
, testpath
|
|
|
|
, jupyter_core
|
2020-11-29 23:01:04 +00:00
|
|
|
, jupyterlab-pygments
|
2017-06-02 16:05:29 +01:00
|
|
|
, nbformat
|
|
|
|
, ipykernel
|
|
|
|
, pandocfilters
|
|
|
|
, tornado
|
2021-10-15 11:33:48 +01:00
|
|
|
, jupyter-client
|
2018-11-04 02:09:19 +00:00
|
|
|
, defusedxml
|
2017-06-02 16:05:29 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nbconvert";
|
2021-11-25 22:47:01 +00:00
|
|
|
version = "6.3.0";
|
2017-06-02 16:05:29 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-11-25 22:47:01 +00:00
|
|
|
sha256 = "5e77d6203854944520105e38f2563a813a4a3708e8563aa598928a3b5ee1081a";
|
2017-06-02 16:05:29 +01:00
|
|
|
};
|
|
|
|
|
2021-03-19 15:47:26 +00:00
|
|
|
# Add $out/share/jupyter to the list of paths that are used to search for
|
|
|
|
# various exporter templates
|
|
|
|
patches = [
|
|
|
|
./templates.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteAllInPlace ./nbconvert/exporters/templateexporter.py
|
|
|
|
'';
|
|
|
|
|
2020-11-29 23:01:04 +00:00
|
|
|
checkInputs = [ pytestCheckHook glibcLocales ];
|
2017-06-02 16:05:29 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
entrypoints bleach mistune jinja2 pygments traitlets testpath
|
2021-10-15 11:33:48 +01:00
|
|
|
jupyter_core nbformat ipykernel pandocfilters tornado jupyter-client
|
2018-11-04 02:09:19 +00:00
|
|
|
defusedxml
|
2020-11-29 23:01:04 +00:00
|
|
|
(nbclient.override { doCheck = false; }) # avoid infinite recursion
|
|
|
|
jupyterlab-pygments
|
2017-06-02 16:05:29 +01:00
|
|
|
];
|
|
|
|
|
2018-11-04 02:09:19 +00:00
|
|
|
# disable preprocessor tests for ipython 7
|
|
|
|
# see issue https://github.com/jupyter/nbconvert/issues/898
|
2020-11-29 23:01:04 +00:00
|
|
|
preCheck = ''
|
2018-11-04 02:09:19 +00:00
|
|
|
export LC_ALL=en_US.UTF-8
|
2020-11-29 23:01:04 +00:00
|
|
|
HOME=$(mktemp -d)
|
2017-06-02 16:05:29 +01:00
|
|
|
'';
|
|
|
|
|
2020-11-29 23:01:04 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--ignore=nbconvert/preprocessors/tests/test_execute.py"
|
|
|
|
# can't resolve template paths within sandbox
|
|
|
|
"--ignore=nbconvert/tests/base.py"
|
|
|
|
"--ignore=nbconvert/tests/test_nbconvertapp.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_export"
|
|
|
|
"test_webpdf_without_chromium"
|
|
|
|
#"test_cell_tag_output"
|
|
|
|
#"test_convert_from_stdin"
|
|
|
|
#"test_convert_full_qualified_name"
|
|
|
|
];
|
|
|
|
|
2019-09-14 20:17:42 +01:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2017-06-02 16:05:29 +01:00
|
|
|
meta = {
|
|
|
|
description = "Converting Jupyter Notebooks";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://jupyter.org/";
|
2017-06-02 16:05:29 +01:00
|
|
|
license = lib.licenses.bsd3;
|
2019-08-20 18:36:05 +01:00
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
2017-06-02 16:05:29 +01:00
|
|
|
};
|
|
|
|
}
|