python310Packages.nbconvert: use mistune 2.x

mistune 0.8 was removed by #186272.
This commit is contained in:
Sebastián Mancilla
2022-08-17 08:41:31 -04:00
parent af9e00071d
commit 8d05ef51d1
@@ -3,6 +3,7 @@
, buildPythonPackage
, defusedxml
, fetchPypi
, fetchpatch
, ipywidgets
, jinja2
, jupyterlab-pygments
@@ -30,10 +31,22 @@ buildPythonPackage rec {
# various exporter templates
patches = [
./templates.patch
# Use mistune 2.x
(fetchpatch {
name = "support-mistune-2.x.patch";
url = "https://github.com/jupyter/nbconvert/commit/e870d9a4a61432a65bee5466c5fa80c9ee28966e.patch";
hash = "sha256-kdOmE7BnkRy2lsNQ2OVrEXXZntJUPJ//b139kSsfKmI=";
excludes = [ "pyproject.toml" ];
})
];
postPatch = ''
substituteAllInPlace ./nbconvert/exporters/templateexporter.py
# Use mistune 2.x
substituteInPlace setup.py \
--replace "mistune>=0.8.1,<2" "mistune>=2.0.3,<3"
'';
propagatedBuildInputs = [