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