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