1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchPypi
5, sphinx
6, beautifulsoup4
7, sphinx-basic-ng
8}:
9
10buildPythonPackage rec {
11 pname = "furo";
12 version = "2022.9.29";
13 format = "wheel";
14
15 disable = pythonOlder "3.7";
16
17 src = fetchPypi {
18 inherit pname version format;
19 dist = "py3";
20 python = "py3";
21 hash = "sha256-VZ7heZnA9ScoSB3PaxsM+Ml0PmjF46GMtFp5knR4aak=";
22 };
23
24 propagatedBuildInputs = [
25 sphinx
26 beautifulsoup4
27 sphinx-basic-ng
28 ];
29
30 installCheckPhase = ''
31 # furo was built incorrectly if this directory is empty
32 # Ignore the hidden file .gitignore
33 cd "$out/lib/python"*
34 if [ "$(ls 'site-packages/furo/theme/furo/static/' | wc -l)" -le 0 ]; then
35 echo 'static directory must not be empty'
36 exit 1
37 fi
38 cd -
39 '';
40
41 pythonImportsCheck = [
42 "furo"
43 ];
44
45 meta = with lib; {
46 description = "A clean customizable documentation theme for Sphinx";
47 homepage = "https://github.com/pradyunsg/furo";
48 license = licenses.mit;
49 maintainers = with maintainers; [ Luflosi ];
50 };
51}