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