mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
0215034f25
when they already rely on SRI hashes.
64 lines
1.2 KiB
Nix
64 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, importlib-metadata
|
|
, markdown-it-py
|
|
, poetry-core
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, setuptools
|
|
, tomli
|
|
, typing-extensions
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "mdformat";
|
|
version = "0.7.16";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "executablebooks";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-6MWUkvZp5CYUWsbMGXM2gudjn5075j5FIuaNnCrgRNs=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
markdown-it-py
|
|
tomli
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
importlib-metadata
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
typing-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# AssertionError
|
|
"test_no_codeblock_trailing_newline"
|
|
# Issue with upper/lower case
|
|
"default_style.md-options0"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"mdformat"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "CommonMark compliant Markdown formatter";
|
|
homepage = "https://mdformat.rtfd.io/";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|