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";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "0.19.1";
|
2022-07-14 12:49:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mkdocstrings";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "sha256-VCWUV+3vXmKbAXImAqY/K4vsA64gHBg83VkxbJua/ao=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pdm-pep517
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2
|
|
|
|
markdown
|
|
|
|
markupsafe
|
|
|
|
mkdocs
|
|
|
|
mkdocs-autorefs
|
|
|
|
pymdown-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-12-17 10:02:37 +00:00
|
|
|
--replace 'dynamic = ["version"]' 'version = "${version}"' \
|
|
|
|
--replace 'license = "ISC"' 'license = {text = "ISC"}'
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mkdocstrings"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Circular dependencies
|
|
|
|
"tests/test_extension.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|