summary refs log tree commit diff
path: root/pkgs/development/python-modules/sphinx-tabs/default.nix
blob: 04630f189d5afb6581a9effa2de6e55efd0816a3 (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
{ lib
, buildPythonPackage
, fetchFromGitHub

# build-system
, setuptools

# documentation build dependencies
, sphinxHook
# runtime dependencies
, sphinx
, pygments
, docutils
# test dependencies
, pytest
, beautifulsoup4
}:

buildPythonPackage rec {
  pname = "sphinx-tabs";
  version = "3.4.4";
  format = "pyproject";

  outputs = [ "out" "doc" ];

  src = fetchFromGitHub {
    owner = "executablebooks";
    repo = "sphinx-tabs";
    rev = "refs/tags/v${version}";
    hash = "sha256-RcCADGJfwXP/U7Uws/uX+huaJzRDRUabQOnc9gqMUzM=";
  };

  postPatch = ''
    substituteInPlace setup.py --replace 'docutils~=0.18.0' 'docutils'
  '';

  nativeBuildInputs = [
    setuptools
    sphinxHook
  ];

  propagatedBuildInputs = [
    sphinx
    pygments
    docutils
  ];

  nativeCheckInputs = [ pytest
    beautifulsoup4
  ];

  pythonImportsCheck = [ "sphinx_tabs" ];

  meta = with lib; {
    description = "A sphinx extension for creating tabbed content when building HTML.";
    homepage = "https://github.com/executablebooks/sphinx-tabs";
    license = licenses.mit;
    maintainers = with maintainers; [ kaction ];
  };
}