1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 pynose,
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 rev = "refs/tags/v${version}";
20 hash = "sha256-N5KG2Wqn9wfGNY3VH4FnBce1aZUbnvVmwD10Loe0Qn4=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [ sphinx-rtd-theme ];
26
27 nativeCheckInputs = [
28 pynose
29 sphinx
30 ];
31
32 checkPhase = ''
33 runHook preCheck
34
35 nosetests tests
36
37 runHook postCheck
38 '';
39
40 pythonImportsCheck = [ "sphinx_rtd_dark_mode" ];
41
42 meta = with lib; {
43 description = "Adds a toggleable dark mode to the Read the Docs theme for Sphinx.";
44 homepage = "https://github.com/MrDogeBro/sphinx_rtd_dark_mode";
45 changelog = "https://github.com/MrDogeBro/sphinx_rtd_dark_mode/releases/tag/v${version}";
46 maintainers = with maintainers; [ wolfgangwalther ];
47 license = licenses.mit;
48 };
49}