2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
jinja2,
|
|
|
|
pdoc-pyo3-sample-library,
|
|
|
|
pygments,
|
|
|
|
markupsafe,
|
|
|
|
astunparse,
|
|
|
|
pytestCheckHook,
|
|
|
|
hypothesis,
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pdoc";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "14.7.0";
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mitmproxy";
|
|
|
|
repo = "pdoc";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-U6gLEuyKvGGP5yKXb+bWDGJqmHTdPYLLPgHLVySAJ6I=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2022-09-09 14:08:57 +00:00
|
|
|
jinja2
|
|
|
|
pygments
|
|
|
|
markupsafe
|
|
|
|
] ++ lib.optional (pythonOlder "3.9") astunparse;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
hypothesis
|
2024-01-25 14:12:00 +00:00
|
|
|
pdoc-pyo3-sample-library
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
2023-03-27 19:17:25 +00:00
|
|
|
disabledTestPaths = [
|
2023-08-10 07:59:29 +00:00
|
|
|
# "test_snapshots" tries to match generated output against stored snapshots,
|
|
|
|
# which are highly sensitive to dep versions.
|
2023-03-27 19:17:25 +00:00
|
|
|
"test/test_snapshot.py"
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestFlagsArray = [
|
2023-08-10 07:59:29 +00:00
|
|
|
''-m "not slow"'' # skip slow tests
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
pythonImportsCheck = [ "pdoc" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-09 11:40:11 +00:00
|
|
|
changelog = "https://github.com/mitmproxy/pdoc/blob/${src.rev}/CHANGELOG.md";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://pdoc.dev/";
|
|
|
|
description = "API Documentation for Python Projects";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pdoc";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [ pbsds ];
|
|
|
|
};
|
|
|
|
}
|