nixpkgs/pkgs/development/python-modules/m2r/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchpatch
, fetchPypi
, docutils
, mistune
, pygments
}:
2017-04-26 12:18:29 +00:00
buildPythonPackage rec {
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
};
patches = [
# fix tests in python 3.10
(fetchpatch {
url = "https://github.com/miyakogi/m2r/commit/58ee9cabdadf5e3deb13037f3052238f0f2bffcd.patch";
sha256 = "sha256-CN3PWmnk7xsn1wngRHuEWmDTP3HtVNxkFv0xzD2Zjlo=";
})
./docutils-0.19-compat.patch
];
postPatch = ''
substituteInPlace tests/test_cli.py \
--replace "optional" "positional"
'';
2017-04-26 12:18:29 +00:00
propagatedBuildInputs = [ mistune docutils ];
checkInputs = [ pygments ];
2017-04-26 12:18:29 +00:00
meta = with lib; {
homepage = "https://github.com/miyakogi/m2r";
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 ];
# https://github.com/miyakogi/m2r/issues/66
broken = versionAtLeast mistune.version "2";
2017-04-26 12:18:29 +00:00
};
}