Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 importlib-metadata, 6 jinja2, 7 markdown, 8 markupsafe, 9 mkdocs, 10 mkdocs-autorefs, 11 pdm-backend, 12 pymdown-extensions, 13 pytestCheckHook, 14 pythonOlder, 15 typing-extensions, 16}: 17 18buildPythonPackage rec { 19 pname = "mkdocstrings"; 20 version = "0.25.2"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "mkdocstrings"; 27 repo = "mkdocstrings"; 28 rev = "refs/tags/${version}"; 29 hash = "sha256-720qF1t/xl2voOMtkOR7U3lFXia4nI0VirgEFHpb39k="; 30 }; 31 32 postPatch = '' 33 substituteInPlace pyproject.toml \ 34 --replace-fail 'dynamic = ["version"]' 'version = "${version}"' 35 ''; 36 37 build-system = [ pdm-backend ]; 38 39 dependencies = 40 [ 41 jinja2 42 markdown 43 markupsafe 44 mkdocs 45 mkdocs-autorefs 46 pymdown-extensions 47 ] 48 ++ lib.optionals (pythonOlder "3.10") [ 49 importlib-metadata 50 typing-extensions 51 ]; 52 53 nativeCheckInputs = [ pytestCheckHook ]; 54 55 pythonImportsCheck = [ "mkdocstrings" ]; 56 57 disabledTestPaths = [ 58 # Circular dependencies 59 "tests/test_extension.py" 60 ]; 61 62 disabledTests = [ 63 # Not all requirements are available 64 "test_disabling_plugin" 65 # Circular dependency on mkdocstrings-python 66 "test_extended_templates" 67 ]; 68 69 meta = with lib; { 70 description = "Automatic documentation from sources for MkDocs"; 71 homepage = "https://github.com/mkdocstrings/mkdocstrings"; 72 changelog = "https://github.com/mkdocstrings/mkdocstrings/blob/${version}/CHANGELOG.md"; 73 license = licenses.isc; 74 maintainers = with maintainers; [ fab ]; 75 }; 76}