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