2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
mdformat,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mdformat-toc";
|
|
|
|
version = "0.3.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hukkin";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-3EX6kGez408tEYiR9VSvi3GTrb4ds+HJwpFflv77nkg=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ mdformat ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "mdformat_toc" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Mdformat plugin to generate a table of contents";
|
|
|
|
homepage = "https://github.com/hukkin/mdformat-toc";
|
|
|
|
license = licenses.mit;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
aldoborrero
|
|
|
|
polarmutex
|
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|