1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchurl, 6 setuptools-scm, 7 git, 8 sphinx, 9 pytestCheckHook, 10 cython, 11 gcc, 12 graphviz, 13}: 14 15buildPythonPackage rec { 16 pname = "sphinx-automodapi"; 17 version = "0.20.0"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "astropy"; 22 repo = "sphinx-automodapi"; 23 tag = "v${version}"; 24 hash = "sha256-RdJZAlHWYrDaGbip+HyCX+tns1nvLkCQa99WyLMIyxo="; 25 leaveDotGit = true; 26 }; 27 28 build-system = [ setuptools-scm ]; 29 30 nativeBuildInputs = [ git ]; 31 32 dependencies = [ sphinx ]; 33 34 # https://github.com/astropy/sphinx-automodapi/issues/155 35 testInventory = fetchurl { 36 # Originally: https://docs.python.org/3/objects.inv 37 url = "https://web.archive.org/web/20221007193144/https://docs.python.org/3/objects.inv"; 38 hash = "sha256-1cbUmdJJSoifkiIYa70SxnLsaK3F2gvnTEWo9vo/6rY="; 39 }; 40 41 postPatch = '' 42 substituteInPlace sphinx_automodapi/tests/{helpers,test_cases}.py \ 43 --replace ", None)" ", (None, '${testInventory}'))" 44 ''; 45 46 nativeCheckInputs = [ 47 pytestCheckHook 48 cython 49 gcc 50 graphviz 51 ]; 52 53 pythonImportsCheck = [ "sphinx_automodapi" ]; 54 55 meta = with lib; { 56 description = "Sphinx extension for generating API documentation"; 57 homepage = "https://github.com/astropy/sphinx-automodapi"; 58 changelog = "https://github.com/astropy/sphinx-automodapi/releases/tag/${src.tag}"; 59 license = licenses.bsd3; 60 maintainers = with maintainers; [ lovesegfault ]; 61 }; 62}