1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 jinja2,
8 pdoc-pyo3-sample-library,
9 pygments,
10 markupsafe,
11 pytestCheckHook,
12 hypothesis,
13 nix-update-script,
14}:
15
16buildPythonPackage rec {
17 pname = "pdoc";
18 version = "15.0.4";
19 disabled = pythonOlder "3.9";
20
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "mitmproxy";
25 repo = "pdoc";
26 tag = "v${version}";
27 hash = "sha256-l0aaQbjxAMcTZZwDN6g8A7bjSsl6yP2FoAnwTYkKYH8=";
28 };
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 jinja2
34 pygments
35 markupsafe
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 hypothesis
41 pdoc-pyo3-sample-library
42 ];
43 disabledTestPaths = [
44 # "test_snapshots" tries to match generated output against stored snapshots,
45 # which are highly sensitive to dep versions.
46 "test/test_snapshot.py"
47 ];
48
49 disabledTestMarks = [
50 "slow" # skip slow tests
51 ];
52
53 __darwinAllowLocalNetworking = true;
54
55 pythonImportsCheck = [ "pdoc" ];
56
57 passthru.updateScript = nix-update-script { };
58
59 meta = with lib; {
60 changelog = "https://github.com/mitmproxy/pdoc/blob/${src.rev}/CHANGELOG.md";
61 homepage = "https://pdoc.dev/";
62 description = "API Documentation for Python Projects";
63 mainProgram = "pdoc";
64 license = licenses.unlicense;
65 maintainers = with maintainers; [ pbsds ];
66 };
67}