diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pdoc/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pdoc/default.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pdoc/default.nix b/nixpkgs/pkgs/development/python-modules/pdoc/default.nix new file mode 100644 index 000000000000..b87b76afdc04 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pdoc/default.nix @@ -0,0 +1,65 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, setuptools +, jinja2 +, pdoc-pyo3-sample-library +, pygments +, markupsafe +, astunparse +, pytestCheckHook +, hypothesis +}: + +buildPythonPackage rec { + pname = "pdoc"; + version = "14.4.0"; + disabled = pythonOlder "3.8"; + + pyproject = true; + + src = fetchFromGitHub { + owner = "mitmproxy"; + repo = "pdoc"; + rev = "v${version}"; + hash = "sha256-2k9uIK6TvoGtVqnh97g9f5QvjhyZlznRvYdw5sPaeVE="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + jinja2 + pygments + markupsafe + ] ++ lib.optional (pythonOlder "3.9") astunparse; + + nativeCheckInputs = [ + pytestCheckHook + hypothesis + pdoc-pyo3-sample-library + ]; + disabledTestPaths = [ + # "test_snapshots" tries to match generated output against stored snapshots, + # which are highly sensitive to dep versions. + "test/test_snapshot.py" + ]; + + pytestFlagsArray = [ + ''-m "not slow"'' # skip slow tests + ]; + + __darwinAllowLocalNetworking = true; + + pythonImportsCheck = [ "pdoc" ]; + + meta = with lib; { + changelog = "https://github.com/mitmproxy/pdoc/blob/${src.rev}/CHANGELOG.md"; + homepage = "https://pdoc.dev/"; + description = "API Documentation for Python Projects"; + license = licenses.unlicense; + maintainers = with maintainers; [ pbsds ]; + }; +} |