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