depot/third_party/nixpkgs/pkgs/development/python-modules/mdformat/default.nix
Default email 634fe97655 Project import generated by Copybara.
GitOrigin-RevId: 09c38c29f2c719cd76ca17a596c2fdac9e186ceb
2021-07-03 00:11:41 -03:00

49 lines
977 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, importlib-metadata
, markdown-it-py
, poetry-core
, pytestCheckHook
, pythonOlder
, typing-extensions
}:
buildPythonPackage rec {
pname = "mdformat";
version = "0.7.7";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "executablebooks";
repo = pname;
rev = version;
sha256 = "sha256-1qwluHxZnSuyNJENzeJzkuhIQN5njTOch2Wz45J0qRI=";
};
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 ];
};
}