@@ -0,0 +1,43 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, fpyutils
5+, pytestCheckHook
6+, pythonOlder
7+}:
8+
9+buildPythonPackage rec {
10+ pname = "md-toc";
11+ version = "7.2.0";
12+ disabled = pythonOlder "3.5";
13+
14+ src = fetchFromGitHub {
15+ owner = "frnmst";
16+ repo = pname;
17+ rev = version;
18+ sha256 = "1v74iddfk5d6170frg89vzrkz9xrycl1f50g59imc7x7g50i6c2x";
19+ };
20+
21+ propagatedBuildInputs = [
22+ fpyutils
23+ ];
24+
25+ checkInputs = [
26+ pytestCheckHook
27+ ];
28+
29+ postPatch = ''
30+ substituteInPlace setup.py --replace "fpyutils>=1.2,<1.3" "fpyutils>=1.2"
31+ '';
32+
33+ pytestFlagsArray = [ "md_toc/tests/*.py" ];
34+
35+ pythonImportsCheck = [ "md_toc" ];
36+
37+ meta = with lib; {
38+ description = "Table of contents generator for Markdown";
39+ homepage = "https://docs.franco.net.eu.org/md-toc/";
40+ license = with licenses; [ gpl3Plus ];
41+ maintainers = with maintainers; [ fab ];
42+ };
43+}