python3Packages.mdformat: init at 0.7.6

This commit is contained in:
Fabian Affolter 2021-05-12 10:44:32 +02:00
parent 1a2c4384f2
commit 1998a4243b
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,49 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, importlib-metadata
, markdown-it-py
, poetry-core
, pytestCheckHook
, pythonOlder
, typing-extensions
}:
buildPythonPackage rec {
pname = "mdformat";
version = "0.7.6";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "executablebooks";
repo = pname;
rev = version;
sha256 = "0mnbi3vp7zgllpcpf6vrjw9y6jas95shphn99ayr8b8wgxsaqkif";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
markdown-it-py
] ++ lib.optionals (pythonOlder "3.10") [
importlib-metadata
] ++ lib.optionals (pythonOlder "3.7") [
typing-extensions
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "mdformat" ];
meta = with lib; {
description = "CommonMark compliant Markdown formatter";
homepage = "https://mdformat.rtfd.io/";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -4125,6 +4125,8 @@ in {
md2gemini = callPackage ../development/python-modules/md2gemini { };
mdformat = callPackage ../development/python-modules/mdformat { };
mdit-py-plugins = callPackage ../development/python-modules/mdit-py-plugins { };
MDP = callPackage ../development/python-modules/mdp { };