1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, jinja2 5, markdown 6, markupsafe 7, mkdocs 8, mkdocs-autorefs 9, pymdown-extensions 10, pytestCheckHook 11, pdm-pep517 12, pythonOlder 13}: 14 15buildPythonPackage rec { 16 pname = "mkdocstrings"; 17 version = "0.19.0"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "mkdocstrings"; 24 repo = pname; 25 rev = version; 26 sha256 = "sha256-7OF1CrRnE4MYHuYD/pasnZpLe9lrbieGp4agnWAaKVo="; 27 }; 28 29 nativeBuildInputs = [ 30 pdm-pep517 31 ]; 32 33 propagatedBuildInputs = [ 34 jinja2 35 markdown 36 markupsafe 37 mkdocs 38 mkdocs-autorefs 39 pymdown-extensions 40 ]; 41 42 checkInputs = [ 43 pytestCheckHook 44 ]; 45 46 postPatch = '' 47 substituteInPlace pyproject.toml \ 48 --replace 'dynamic = ["version"]' 'version = "${version}"' 49 ''; 50 51 pythonImportsCheck = [ 52 "mkdocstrings" 53 ]; 54 55 disabledTestPaths = [ 56 # Circular dependencies 57 "tests/test_extension.py" 58 ]; 59 60 meta = with lib; { 61 description = "Automatic documentation from sources for MkDocs"; 62 homepage = "https://github.com/mkdocstrings/mkdocstrings"; 63 license = licenses.isc; 64 maintainers = with maintainers; [ fab ]; 65 }; 66}