Skip to content

Commit

Permalink
python310Packages.nbconvert: use mistune 2.x
Browse files Browse the repository at this point in the history
mistune 0.8 was removed by #186272.

(cherry picked from commit 8d05ef5)
  • Loading branch information
smancill authored and github-actions[bot] committed Aug 20, 2022
1 parent a1eac15 commit 3f71734
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkgs/development/python-modules/nbconvert/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
, buildPythonPackage
, defusedxml
, fetchPypi
, fetchpatch
, ipywidgets
, jinja2
, jupyterlab-pygments
Expand Down Expand Up @@ -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 = [
Expand Down

0 comments on commit 3f71734

Please sign in to comment.