at 24.05-pre 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchpatch 4, fetchPypi 5, docutils 6, mistune 7, pygments 8}: 9 10buildPythonPackage rec { 11 pname = "m2r"; 12 version = "0.3.1"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "sha256-qvtn/EnPsdieRqNEOsdH4V9LtC3yDtBPBnrZ777iVqs="; 17 }; 18 19 patches = [ 20 # fix tests in python 3.10 21 (fetchpatch { 22 url = "https://github.com/miyakogi/m2r/commit/58ee9cabdadf5e3deb13037f3052238f0f2bffcd.patch"; 23 hash = "sha256-CN3PWmnk7xsn1wngRHuEWmDTP3HtVNxkFv0xzD2Zjlo="; 24 }) 25 ./docutils-0.19-compat.patch 26 ]; 27 28 postPatch = '' 29 substituteInPlace tests/test_cli.py \ 30 --replace "optional" "positional" 31 ''; 32 33 propagatedBuildInputs = [ mistune docutils ]; 34 35 nativeCheckInputs = [ pygments ]; 36 37 meta = with lib; { 38 homepage = "https://github.com/miyakogi/m2r"; 39 description = "Markdown to reStructuredText converter"; 40 license = licenses.mit; 41 maintainers = with maintainers; [ AndersonTorres ]; 42 # https://github.com/miyakogi/m2r/issues/66 43 broken = versionAtLeast mistune.version "2"; 44 }; 45}