2022-05-18 14:49:53 +00:00
|
|
|
{ beautifulsoup4
|
|
|
|
, bleach
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-05-18 14:49:53 +00:00
|
|
|
, defusedxml
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2022-05-18 14:49:53 +00:00
|
|
|
, ipywidgets
|
2020-04-24 23:36:52 +00:00
|
|
|
, jinja2
|
2020-12-07 07:45:13 +00:00
|
|
|
, jupyterlab-pygments
|
2022-05-18 14:49:53 +00:00
|
|
|
, lib
|
|
|
|
, markupsafe
|
|
|
|
, mistune
|
|
|
|
, nbclient
|
2020-04-24 23:36:52 +00:00
|
|
|
, pandocfilters
|
2022-05-18 14:49:53 +00:00
|
|
|
, pyppeteer
|
|
|
|
, pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
, tinycss2
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nbconvert";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "6.5.0";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-Ij5G4nq+hZa4rtVDAfrbukM7f/6oGWpo/Xsf9Qnu6Z0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-23 19:22:30 +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-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
beautifulsoup4
|
|
|
|
bleach
|
|
|
|
defusedxml
|
|
|
|
jinja2
|
2020-12-07 07:45:13 +00:00
|
|
|
jupyterlab-pygments
|
2022-05-18 14:49:53 +00:00
|
|
|
markupsafe
|
|
|
|
mistune
|
|
|
|
nbclient
|
|
|
|
pandocfilters
|
|
|
|
tinycss2
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
preCheck = ''
|
2022-05-18 14:49:53 +00:00
|
|
|
export HOME=$(mktemp -d)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
checkInputs = [
|
|
|
|
ipywidgets
|
|
|
|
pyppeteer
|
|
|
|
pytestCheckHook
|
2020-12-07 07:45:13 +00:00
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# DeprecationWarning: Support for bleach <5 will be removed in a future version of nbconvert
|
|
|
|
"-W ignore::DeprecationWarning"
|
|
|
|
];
|
2020-12-07 07:45:13 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
2022-05-18 14:49:53 +00:00
|
|
|
# Attempts network access (Failed to establish a new connection: [Errno -3] Temporary failure in name resolution)
|
2020-12-07 07:45:13 +00:00
|
|
|
"test_export"
|
2022-05-18 14:49:53 +00:00
|
|
|
"test_webpdf_with_chromium"
|
2020-12-07 07:45:13 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Converting Jupyter Notebooks";
|
|
|
|
homepage = "https://jupyter.org/";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
|
|
};
|
|
|
|
}
|