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