2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
2022-10-30 15:09:59 +00:00
|
|
|
, buildPythonPackage
|
2022-07-14 12:49:19 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, jinja2
|
|
|
|
, markdown
|
|
|
|
, markupsafe
|
|
|
|
, mkdocs
|
|
|
|
, mkdocs-autorefs
|
|
|
|
, pymdown-extensions
|
|
|
|
, pytestCheckHook
|
|
|
|
, pdm-pep517
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildPythonPackage rec {
|
2022-07-14 12:49:19 +00:00
|
|
|
pname = "mkdocstrings";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.20.0";
|
2022-07-14 12:49:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mkdocstrings";
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-eFHcwbYEIwVWvDJWlmeUvEdqp3NYAF8SgdHJGw6bEMc=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'dynamic = ["version"]' 'version = "${version}"' \
|
|
|
|
--replace 'license = "ISC"' 'license = {text = "ISC"}'
|
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pdm-pep517
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2
|
|
|
|
markdown
|
|
|
|
markupsafe
|
|
|
|
mkdocs
|
|
|
|
mkdocs-autorefs
|
|
|
|
pymdown-extensions
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mkdocstrings"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Circular dependencies
|
|
|
|
"tests/test_extension.py"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Not all requirements are available
|
|
|
|
"test_disabling_plugin"
|
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Automatic documentation from sources for MkDocs";
|
|
|
|
homepage = "https://github.com/mkdocstrings/mkdocstrings";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/mkdocstrings/mkdocstrings/blob/${version}/CHANGELOG.md";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|