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
|
|
|
|
, griffe
|
|
|
|
, mkdocs-material
|
|
|
|
, mkdocstrings
|
|
|
|
, pdm-pep517
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildPythonPackage rec {
|
2022-07-14 12:49:19 +00:00
|
|
|
pname = "mkdocstrings-python";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "0.8.3";
|
2022-07-14 12:49:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mkdocstrings";
|
|
|
|
repo = "python";
|
|
|
|
rev = version;
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-JGk6oJQ6mcLtn7SDtltsLPT+CxPZNRbq8bnY9pMcXHc=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pdm-pep517
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
griffe
|
|
|
|
mkdocstrings
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mkdocs-material
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-11-21 17:40:18 +00:00
|
|
|
--replace 'license = "ISC"' 'license = {text = "ISC"}' \
|
2022-07-14 12:49:19 +00:00
|
|
|
--replace 'dynamic = ["version"]' 'version = "${version}"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mkdocstrings_handlers"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python handler for mkdocstrings";
|
|
|
|
homepage = "https://github.com/mkdocstrings/python";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/mkdocstrings/python/blob/${version}/CHANGELOG.md";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|