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
|
|
|
|
, markdown
|
|
|
|
, mkdocs
|
|
|
|
, pytestCheckHook
|
2023-08-22 20:05:09 +00:00
|
|
|
, pdm-backend
|
2022-07-14 12:49:19 +00:00
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
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}"'
|
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
pdm-backend
|
2022-07-14 12:49:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
markdown
|
|
|
|
mkdocs
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"mkdocs_autorefs"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|