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