1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 # documentation build dependencies
7 sphinxHook,
8 sphinx-rtd-theme,
9 matplotlib,
10 ipython,
11 # runtime dependencies
12 sphinx,
13 beautifulsoup4,
14 # check dependencies
15 pytest,
16}:
17
18buildPythonPackage rec {
19 pname = "sphinx-codeautolink";
20 version = "0.17.5";
21 pyproject = true;
22
23 outputs = [
24 "out"
25 "doc"
26 ];
27
28 src = fetchFromGitHub {
29 owner = "felix-hilden";
30 repo = "sphinx-codeautolink";
31 tag = "v${version}";
32 hash = "sha256-43XDCajH+uSHnofjK/gH4EAiv2ljjuBr8UbJtm/DsDI=";
33 };
34
35 build-system = [ setuptools ];
36
37 nativeBuildInputs = [
38 sphinxHook
39 sphinx-rtd-theme
40 matplotlib
41 ipython
42 ];
43
44 sphinxRoot = "docs/src";
45
46 dependencies = [
47 sphinx
48 beautifulsoup4
49 ];
50
51 nativeCheckInputs = [ pytest ];
52
53 pythonImportsCheck = [ "sphinx_codeautolink" ];
54
55 meta = with lib; {
56 description = "Sphinx extension that makes code examples clickable";
57 homepage = "https://github.com/felix-hilden/sphinx-codeautolink";
58 changelog = "https://github.com/felix-hilden/sphinx-codeautolink/releases/tag/${src.tag}";
59 license = licenses.mit;
60 maintainers = with maintainers; [ kaction ];
61 };
62}