1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 mdformat,
6 poetry-core,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "mdformat-toc";
13 version = "0.3.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "hukkin";
20 repo = "mdformat-toc";
21 tag = version;
22 hash = "sha256-3EX6kGez408tEYiR9VSvi3GTrb4ds+HJwpFflv77nkg=";
23 };
24
25 nativeBuildInputs = [ poetry-core ];
26
27 propagatedBuildInputs = [ mdformat ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 pythonImportsCheck = [ "mdformat_toc" ];
32
33 meta = with lib; {
34 description = "Mdformat plugin to generate a table of contents";
35 homepage = "https://github.com/hukkin/mdformat-toc";
36 license = licenses.mit;
37 maintainers = with maintainers; [
38 aldoborrero
39 polarmutex
40 ];
41 broken = true; # broken test due to changes in mdformat; compare https://github.com/KyleKing/mdformat-admon/issues/25
42 };
43}