1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 pytestCheckHook,
6 setuptools,
7 sphinx,
8 sphinx-rtd-theme,
9}:
10
11buildPythonPackage rec {
12 pname = "sphinx-rtd-dark-mode";
13 version = "1.3.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "MrDogeBro";
18 repo = "sphinx_rtd_dark_mode";
19 tag = "v${version}";
20 hash = "sha256-N5KG2Wqn9wfGNY3VH4FnBce1aZUbnvVmwD10Loe0Qn4=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [ sphinx-rtd-theme ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 sphinx
30 ];
31
32 enabledTestPaths = [ "tests/build.py" ];
33
34 pythonImportsCheck = [ "sphinx_rtd_dark_mode" ];
35
36 meta = with lib; {
37 description = "Adds a toggleable dark mode to the Read the Docs theme for Sphinx";
38 homepage = "https://github.com/MrDogeBro/sphinx_rtd_dark_mode";
39 changelog = "https://github.com/MrDogeBro/sphinx_rtd_dark_mode/releases/tag/v${version}";
40 maintainers = with maintainers; [ wolfgangwalther ];
41 license = licenses.mit;
42 };
43}