depot/third_party/nixpkgs/pkgs/development/python-modules/furo/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

52 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, sphinx
, beautifulsoup4
, sphinx-basic-ng
}:
buildPythonPackage rec {
pname = "furo";
version = "2022.12.7";
format = "wheel";
disable = pythonOlder "3.7";
src = fetchPypi {
inherit pname version format;
dist = "py3";
python = "py3";
hash = "sha256-fLdsEqJe9l24WrB0PfkHVz0DAnozYx8X0mflmOuxkfc=";
};
propagatedBuildInputs = [
sphinx
beautifulsoup4
sphinx-basic-ng
];
installCheckPhase = ''
# furo was built incorrectly if this directory is empty
# Ignore the hidden file .gitignore
cd "$out/lib/python"*
if [ "$(ls 'site-packages/furo/theme/furo/static/' | wc -l)" -le 0 ]; then
echo 'static directory must not be empty'
exit 1
fi
cd -
'';
pythonImportsCheck = [
"furo"
];
meta = with lib; {
description = "A clean customizable documentation theme for Sphinx";
homepage = "https://github.com/pradyunsg/furo";
changelog = "https://github.com/pradyunsg/furo/blob/${version}/docs/changelog.md";
license = licenses.mit;
maintainers = with maintainers; [ Luflosi ];
};
}