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