about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/sphinx-hoverxref/default.nix
blob: d6237387bf88c54be204aecdc5d5786f405cdbec (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-core
, pythonImportsCheckHook
# documentation build dependencies
, sphinxHook
, sphinx-notfound-page
, sphinx-prompt
, sphinx-rtd-theme
, sphinx-tabs
, sphinx-version-warning
, sphinx-autoapi
, sphinxcontrib-bibtex
, sphinxemoji
# runtime dependencies
, sphinx
, sphinxcontrib-jquery
}:

buildPythonPackage rec {
  pname = "sphinx-hoverxref";
  version = "1.3.0";
  format = "pyproject";
  outputs = [ "out" "doc" ];

  src = fetchFromGitHub {
    owner = "readthedocs";
    repo = "sphinx-hoverxref";
    rev = version;
    hash = "sha256-DJ+mHu9IeEYEyf/SD+nDNtWpTf6z7tQzG0ogaECDpkU=";
  };

  nativeBuildInputs = [
    flit-core
    pythonImportsCheckHook

    sphinxHook
    sphinx-notfound-page
    sphinx-prompt
    sphinx-rtd-theme
    sphinx-tabs
    sphinx-version-warning
    sphinx-autoapi
    sphinxcontrib-bibtex
    sphinxemoji
  ];

  propagatedBuildInputs = [ sphinx sphinxcontrib-jquery ];

  pythonImportsCheck = [ "hoverxref" ];

  meta = with lib; {
    description = "A sphinx extension for creating tooltips on the cross references of the documentation";
    longDescription = ''
      sphinx-hoverxref is a Sphinx extension to show a floating window
      (tooltips or modal dialogues) on the cross references of the
      documentation embedding the content of the linked section on them.

      With sphinx-hoverxref, you don’t need to click a link to see what’s
      in there.
    '';
    homepage = "https://github.com/readthedocs/sphinx-hoverxref";
    license = licenses.mit;
    maintainers = with maintainers; [ kaction ];
  };
}