about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/sphinx-notfound-page/default.nix
blob: e9f5d9c4519dc63261d868f7607d9a7cbde67956 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-core
, pythonImportsCheckHook
# documentation build dependencies
, sphinxHook
, sphinx-prompt
, sphinx-rtd-theme
, sphinx-tabs
, sphinx-autoapi
, sphinxemoji
# runtime dependencies
, sphinx
}:

buildPythonPackage rec {
  pname = "sphinx-notfound-page";
  version = "1.0.0";
  format = "pyproject";
  outputs = [ "out" "doc" ];

  src = fetchFromGitHub {
    owner = "readthedocs";
    repo = "sphinx-notfound-page";
    rev = version;
    hash = "sha256-tG71UuYbdlWNgq6Y5xRH3aWc9/eTr/RlsRNWSUjrbBE=";
  };

  nativeBuildInputs = [
    flit-core
    pythonImportsCheckHook
    sphinxHook
    sphinx-prompt
    sphinx-rtd-theme
    sphinx-tabs
    sphinx-autoapi
    sphinxemoji
  ];

  propagatedBuildInputs = [ sphinx ];

  pythonImportsCheck = [ "notfound" ];

  meta = with lib; {
    description = "A sphinx extension to create a custom 404 page with absolute URLs hardcoded";
    homepage = "https://github.com/readthedocs/sphinx-notfound-page";
    license = licenses.mit;
    maintainers = with maintainers; [ kaction ];
  };
}