2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
markdown,
|
|
|
|
mkdocs,
|
|
|
|
pytestCheckHook,
|
|
|
|
pdm-backend,
|
|
|
|
pythonOlder,
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildPythonPackage rec {
|
2022-07-14 12:49:19 +00:00
|
|
|
pname = "mkdocs-autorefs";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.0.1";
|
2022-07-14 12:49:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mkdocstrings";
|
|
|
|
repo = "autorefs";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-YORrIQ+iZQZ1U/fe/IH3B/5gN0QxQF73s9vF6qvKL7Q=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'dynamic = ["version"]' 'version = "${version}"'
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ pdm-backend ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
markdown
|
|
|
|
mkdocs
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# missing pymdownx
|
|
|
|
"test_reference_implicit_with_code_inlinehilite_plain"
|
|
|
|
"test_reference_implicit_with_code_inlinehilite_python"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "mkdocs_autorefs" ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Automatically link across pages in MkDocs";
|
|
|
|
homepage = "https://github.com/mkdocstrings/autorefs/";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/mkdocstrings/autorefs/blob/${version}/CHANGELOG.md";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|