2022-05-07 01:28:21 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-06-02 23:58:27 +00:00
|
|
|
, fetchpatch
|
2022-05-07 01:28:21 +00:00
|
|
|
, fetchPypi
|
|
|
|
, docutils
|
|
|
|
, mistune
|
|
|
|
, pygments
|
|
|
|
}:
|
|
|
|
|
2017-04-26 12:18:29 +00:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 09:25:35 +00:00
|
|
|
pname = "m2r";
|
2019-01-17 15:13:02 +00:00
|
|
|
version = "0.2.1";
|
2017-04-26 12:18:29 +00:00
|
|
|
|
2017-06-06 09:33:31 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-01-17 15:13:02 +00:00
|
|
|
sha256 = "bf90bad66cda1164b17e5ba4a037806d2443f2a4d5ddc9f6a5554a0322aaed99";
|
2017-04-26 12:18:29 +00:00
|
|
|
};
|
|
|
|
|
2022-06-02 23:58:27 +00:00
|
|
|
patches = [
|
|
|
|
# fix tests in python 3.10
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/miyakogi/m2r/commit/58ee9cabdadf5e3deb13037f3052238f0f2bffcd.patch";
|
|
|
|
sha256 = "sha256-CN3PWmnk7xsn1wngRHuEWmDTP3HtVNxkFv0xzD2Zjlo=";
|
|
|
|
})
|
2022-07-15 16:40:32 +00:00
|
|
|
./docutils-0.19-compat.patch
|
2022-06-02 23:58:27 +00:00
|
|
|
];
|
|
|
|
|
2022-05-07 01:28:21 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_cli.py \
|
|
|
|
--replace "optional" "positional"
|
|
|
|
'';
|
|
|
|
|
2017-04-26 12:18:29 +00:00
|
|
|
propagatedBuildInputs = [ mistune docutils ];
|
|
|
|
|
2022-05-07 01:28:21 +00:00
|
|
|
checkInputs = [ pygments ];
|
2017-04-26 12:18:29 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/miyakogi/m2r";
|
2022-05-07 01:28:21 +00:00
|
|
|
description = "Markdown to reStructuredText converter";
|
2017-04-26 12:18:29 +00:00
|
|
|
license = licenses.mit;
|
2022-08-12 11:37:14 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres SuperSandro2000 ];
|
2022-08-12 11:25:56 +00:00
|
|
|
# https://github.com/miyakogi/m2r/issues/66
|
|
|
|
broken = versionAtLeast mistune.version "2";
|
2017-04-26 12:18:29 +00:00
|
|
|
};
|
|
|
|
}
|