Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.21.2"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "mkdocstrings"; 24 repo = pname; 25 rev = "refs/tags/${version}"; 26 hash = "sha256-pi0BEe/zhG/V9wh2CO91Cc7Mze93+2tbVo6/2LGQ6Nw="; 27 }; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml \ 31 --replace 'dynamic = ["version"]' 'version = "${version}"' \ 32 --replace 'license = "ISC"' 'license = {text = "ISC"}' 33 ''; 34 35 nativeBuildInputs = [ 36 pdm-pep517 37 ]; 38 39 propagatedBuildInputs = [ 40 jinja2 41 markdown 42 markupsafe 43 mkdocs 44 mkdocs-autorefs 45 pymdown-extensions 46 ]; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 ]; 51 52 pythonImportsCheck = [ 53 "mkdocstrings" 54 ]; 55 56 disabledTestPaths = [ 57 # Circular dependencies 58 "tests/test_extension.py" 59 ]; 60 61 disabledTests = [ 62 # Not all requirements are available 63 "test_disabling_plugin" 64 ]; 65 66 meta = with lib; { 67 description = "Automatic documentation from sources for MkDocs"; 68 homepage = "https://github.com/mkdocstrings/mkdocstrings"; 69 changelog = "https://github.com/mkdocstrings/mkdocstrings/blob/${version}/CHANGELOG.md"; 70 license = licenses.isc; 71 maintainers = with maintainers; [ fab ]; 72 }; 73}