Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / mkdocstrings / default.nix
bloba8dc02b4a980c97e3f9575bbdd3654e516facc0c
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,
18 buildPythonPackage rec {
19   pname = "mkdocstrings";
20   version = "0.24.3";
21   pyproject = true;
23   disabled = pythonOlder "3.8";
25   src = fetchFromGitHub {
26     owner = "mkdocstrings";
27     repo = "mkdocstrings";
28     rev = "refs/tags/${version}";
29     hash = "sha256-L3QQ2ll2sDbQwrmw88iwTW6WS2SNsiMR2TvuV4P1uj4=";
30   };
32   postPatch = ''
33     substituteInPlace pyproject.toml \
34       --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
35   '';
37   build-system = [ pdm-backend ];
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     ];
53   nativeCheckInputs = [ pytestCheckHook ];
55   pythonImportsCheck = [ "mkdocstrings" ];
57   disabledTestPaths = [
58     # Circular dependencies
59     "tests/test_extension.py"
60   ];
62   disabledTests = [
63     # Not all requirements are available
64     "test_disabling_plugin"
65     # Circular dependency on mkdocstrings-python
66     "test_extended_templates"
67   ];
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   };