about summary refs log tree commit diff
path: root/pkgs/development/python-modules/sphinx-codeautolink/default.nix
blob: e7defb682db327652951b8701761efb927530184 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
# documentation build dependencies
, sphinxHook
, sphinx-rtd-theme
, matplotlib
, ipython
# runtime dependencies
, sphinx
, beautifulsoup4
# check dependencies
, pytest
}:

buildPythonPackage rec {
  pname = "sphinx-codeautolink";
  version = "0.15.0";
  format = "pyproject";

  outputs = [ "out" "doc" ];

  src = fetchFromGitHub {
    owner = "felix-hilden";
    repo = "sphinx-codeautolink";
    rev = "refs/tags/v${version}";
    hash = "sha256-iXUdOwyTRViDTDRPCcteiJ2Rcdbpiol7JPEzqbUwIPc=";
  };

  nativeBuildInputs = [
    setuptools
    sphinxHook
    sphinx-rtd-theme
    matplotlib
    ipython
  ];

  sphinxRoot = "docs/src";

  propagatedBuildInputs = [ sphinx beautifulsoup4 ];

  nativeCheckInputs = [ pytest ];

  pythonImportsCheck = [ "sphinx_codeautolink" ];

  meta = with lib; {
    description = "A sphinx extension that makes code examples clickable";
    homepage = "https://github.com/felix-hilden/sphinx-codeautolink";
    license = licenses.mit;
    maintainers = with maintainers; [ kaction ];
  };
}