1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonImportsCheckHook
5# documentation build dependencies
6, sphinxHook
7# runtime dependencies
8, sphinx
9, pygments
10, docutils
11# test dependencies
12, pytest
13, beautifulsoup4
14}:
15
16buildPythonPackage rec {
17 pname = "sphinx-tabs";
18 version = "3.4.1";
19 outputs = [ "out" "doc" ];
20
21 src = fetchFromGitHub {
22 owner = "executablebooks";
23 repo = "sphinx-tabs";
24 rev = "v${version}";
25 hash = "sha256-5lpo7NRCksXJOdbLSFjDxQV/BsxRBb93lA6tavz6YEs=";
26 };
27
28 postPatch = ''
29 substituteInPlace setup.py --replace 'docutils~=0.18.0' 'docutils'
30 '';
31
32 nativeBuildInputs = [
33 pythonImportsCheckHook
34 sphinxHook
35 ];
36
37 propagatedBuildInputs = [
38 sphinx
39 pygments
40 docutils
41 ];
42
43 nativeCheckInputs = [ pytest
44 beautifulsoup4
45 ];
46
47 pythonImportsCheck = [ "sphinx_tabs" ];
48
49 meta = with lib; {
50 description = "A sphinx extension for creating tabbed content when building HTML.";
51 homepage = "https://github.com/executablebooks/sphinx-tabs";
52 license = licenses.mit;
53 maintainers = with maintainers; [ kaction ];
54 };
55}