1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 markdown, 6 mkdocs, 7 pytestCheckHook, 8 pdm-backend, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "mkdocs-autorefs"; 14 version = "1.0.1"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchFromGitHub { 20 owner = "mkdocstrings"; 21 repo = "autorefs"; 22 rev = "refs/tags/${version}"; 23 hash = "sha256-YORrIQ+iZQZ1U/fe/IH3B/5gN0QxQF73s9vF6qvKL7Q="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace 'dynamic = ["version"]' 'version = "${version}"' 29 ''; 30 31 nativeBuildInputs = [ pdm-backend ]; 32 33 propagatedBuildInputs = [ 34 markdown 35 mkdocs 36 ]; 37 38 nativeCheckInputs = [ pytestCheckHook ]; 39 40 disabledTests = [ 41 # missing pymdownx 42 "test_reference_implicit_with_code_inlinehilite_plain" 43 "test_reference_implicit_with_code_inlinehilite_python" 44 ]; 45 46 pythonImportsCheck = [ "mkdocs_autorefs" ]; 47 48 meta = with lib; { 49 description = "Automatically link across pages in MkDocs"; 50 homepage = "https://github.com/mkdocstrings/autorefs/"; 51 changelog = "https://github.com/mkdocstrings/autorefs/blob/${version}/CHANGELOG.md"; 52 license = licenses.isc; 53 maintainers = with maintainers; [ fab ]; 54 }; 55}