1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fpyutils,
6 pyfakefs,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "md-toc";
14 version = "8.2.3";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "frnmst";
21 repo = "md-toc";
22 tag = version;
23 hash = "sha256-nKkKtLEW0pohXiMtjWl2Kzh7SRwZJ/yzhXpDyluLodc=";
24 };
25
26 nativeBuildInputs = [ setuptools ];
27
28 propagatedBuildInputs = [ fpyutils ];
29
30 nativeCheckInputs = [
31 pyfakefs
32 pytestCheckHook
33 ];
34
35 enabledTestPaths = [ "md_toc/tests/*.py" ];
36
37 pythonImportsCheck = [ "md_toc" ];
38
39 meta = with lib; {
40 description = "Table of contents generator for Markdown";
41 mainProgram = "md_toc";
42 homepage = "https://docs.franco.net.eu.org/md-toc/";
43 changelog = "https://blog.franco.net.eu.org/software/CHANGELOG-md-toc.html";
44 license = with licenses; [ gpl3Plus ];
45 maintainers = with maintainers; [ fab ];
46 };
47}