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.15.2";
21 format = "pyproject";
22
23 outputs = [
24 "out"
25 "doc"
26 ];
27
28 src = fetchFromGitHub {
29 owner = "felix-hilden";
30 repo = "sphinx-codeautolink";
31 rev = "refs/tags/v${version}";
32 hash = "sha256-h1lteF5a3ga1VlhXCz2biydli3sg3ktPbz0O5n0eeFI=";
33 };
34
35 nativeBuildInputs = [
36 setuptools
37 sphinxHook
38 sphinx-rtd-theme
39 matplotlib
40 ipython
41 ];
42
43 sphinxRoot = "docs/src";
44
45 propagatedBuildInputs = [
46 sphinx
47 beautifulsoup4
48 ];
49
50 nativeCheckInputs = [ pytest ];
51
52 pythonImportsCheck = [ "sphinx_codeautolink" ];
53
54 meta = with lib; {
55 description = "Sphinx extension that makes code examples clickable";
56 homepage = "https://github.com/felix-hilden/sphinx-codeautolink";
57 license = licenses.mit;
58 maintainers = with maintainers; [ kaction ];
59 };
60}