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.3.1"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.9"; 18 19 src = fetchFromGitHub { 20 owner = "mkdocstrings"; 21 repo = "autorefs"; 22 tag = version; 23 hash = "sha256-YVkj4D7JK0GOqnGlg5L3uqFsBB5C0OnlXX+wYW4GpkQ="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace 'dynamic = ["version"]' 'version = "${version}"' 29 ''; 30 31 build-system = [ pdm-backend ]; 32 33 dependencies = [ 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/${src.tag}/CHANGELOG.md"; 52 license = licenses.isc; 53 maintainers = with maintainers; [ fab ]; 54 }; 55}