1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-core,
6 pythonOlder,
7 # documentation build dependencies
8 sphinxHook,
9 sphinx-prompt,
10 sphinx-rtd-theme,
11 sphinx-tabs,
12 sphinx-autoapi,
13 sphinxemoji,
14 # runtime dependencies
15 sphinx,
16 setuptools,
17}:
18
19buildPythonPackage rec {
20 pname = "sphinx-notfound-page";
21 version = "1.1.0";
22 pyproject = true;
23
24 disabled = pythonOlder "3.8";
25
26 outputs = [
27 "out"
28 "doc"
29 ];
30
31 src = fetchFromGitHub {
32 owner = "readthedocs";
33 repo = "sphinx-notfound-page";
34 tag = version;
35 hash = "sha256-KkdbK8diuQtZQk6FC9xDK/U7mfRBwwUmXp4YYuKueLQ=";
36 };
37
38 nativeBuildInputs = [
39 flit-core
40 sphinxHook
41 sphinx-prompt
42 sphinx-rtd-theme
43 sphinx-tabs
44 sphinx-autoapi
45 sphinxemoji
46 ];
47
48 buildInputs = [ sphinx ];
49
50 propagatedBuildInputs = [ setuptools ];
51
52 pythonImportsCheck = [ "notfound" ];
53
54 meta = with lib; {
55 description = "Sphinx extension to create a custom 404 page with absolute URLs hardcoded";
56 homepage = "https://github.com/readthedocs/sphinx-notfound-page";
57 changelog = "https://github.com/readthedocs/sphinx-notfound-page/blob/${version}/CHANGELOG.rst";
58 license = licenses.mit;
59 maintainers = with maintainers; [ kaction ];
60 };
61}