1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
{ beautifulsoup4
, bleach
, buildPythonPackage
, defusedxml
, fetchPypi
, ipywidgets
, jinja2
, jupyterlab-pygments
, lib
, markupsafe
, mistune
, nbclient
, pandocfilters
, pyppeteer
, pytestCheckHook
, tinycss2
}:
buildPythonPackage rec {
pname = "nbconvert";
version = "6.5.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-Ij5G4nq+hZa4rtVDAfrbukM7f/6oGWpo/Xsf9Qnu6Z0=";
};
# 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
'';
propagatedBuildInputs = [
beautifulsoup4
bleach
defusedxml
jinja2
jupyterlab-pygments
markupsafe
mistune
nbclient
pandocfilters
tinycss2
];
preCheck = ''
export HOME=$(mktemp -d)
'';
checkInputs = [
ipywidgets
pyppeteer
pytestCheckHook
];
pytestFlagsArray = [
# DeprecationWarning: Support for bleach <5 will be removed in a future version of nbconvert
"-W ignore::DeprecationWarning"
];
disabledTests = [
# Attempts network access (Failed to establish a new connection: [Errno -3] Temporary failure in name resolution)
"test_export"
"test_webpdf_with_chromium"
];
# 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 ];
};
}
|