blob: d3b4bf7f41045cb9fd0a4630eb45c01f40fb1531 (
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
|
{
buildPythonPackage,
fetchFromGitHub,
lib,
pythonOlder,
nose,
setuptools,
sphinx,
sphinx-rtd-theme,
}:
buildPythonPackage rec {
pname = "sphinx-rtd-dark-mode";
version = "1.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "MrDogeBro";
repo = "sphinx_rtd_dark_mode";
rev = "refs/tags/v${version}";
hash = "sha256-N5KG2Wqn9wfGNY3VH4FnBce1aZUbnvVmwD10Loe0Qn4=";
};
build-system = [ setuptools ];
dependencies = [ sphinx-rtd-theme ];
# tests rely on nose
doCheck = pythonOlder "3.12";
nativeCheckInputs = [
nose
sphinx
];
checkPhase = ''
runHook preCheck
nosetests tests
runHook postCheck
'';
pythonImportsCheck = [ "sphinx_rtd_dark_mode" ];
meta = with lib; {
description = "Adds a toggleable dark mode to the Read the Docs theme for Sphinx";
homepage = "https://github.com/MrDogeBro/sphinx_rtd_dark_mode";
changelog = "https://github.com/MrDogeBro/sphinx_rtd_dark_mode/releases/tag/v${version}";
maintainers = with maintainers; [ wolfgangwalther ];
license = licenses.mit;
};
}
|