1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 fetchpatch,
6 pythonOlder,
7 mako,
8 markdown,
9 setuptools-git,
10 setuptools-scm,
11}:
12
13buildPythonPackage rec {
14 pname = "pdoc3";
15 version = "0.10.0";
16 format = "setuptools";
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-XyLnvLlpAGc44apCGcdaMvNMLWLUbcnS+y0+CwKH5Lc=";
22 };
23
24 patches = [
25 (fetchpatch {
26 # test_Class_params fails in 0.10.0
27 # https://github.com/pdoc3/pdoc/issues/355
28 url = "https://github.com/pdoc3/pdoc/commit/4aa70de2221a34a3003a7e5f52a9b91965f0e359.patch";
29 hash = "sha256-W7Dy516cA+Oj0ZCTQBB6MJ+fCTBeLRp+aW8nANdxSx8=";
30 })
31 # https://github.com/pdoc3/pdoc/issues/400
32 (fetchpatch {
33 name = "fix-test-for-python310.patch";
34 url = "https://github.com/pdoc3/pdoc/commit/80af5d40d3ca39e2701c44941c1003ae6a280799.patch";
35 hash = "sha256-69Cn+BY7feisSHugONIF/PRgEDEfnvnS/RBHWv1P8/w=";
36 excludes = [ ".github/workflows/ci.yml" ];
37 })
38 ];
39
40 nativeBuildInputs = [
41 setuptools-git
42 setuptools-scm
43 ];
44
45 propagatedBuildInputs = [
46 mako
47 markdown
48 ];
49
50 meta = with lib; {
51 description = "Auto-generate API documentation for Python projects";
52 homepage = "https://pdoc3.github.io/pdoc/";
53 license = with licenses; [ agpl3Plus ];
54 maintainers = with maintainers; [ catern ];
55 };
56}