Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 setuptools, 7 jinja2, 8 pdoc-pyo3-sample-library, 9 pygments, 10 markupsafe, 11 astunparse, 12 pytestCheckHook, 13 hypothesis, 14}: 15 16buildPythonPackage rec { 17 pname = "pdoc"; 18 version = "14.6.0"; 19 disabled = pythonOlder "3.8"; 20 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "mitmproxy"; 25 repo = "pdoc"; 26 rev = "v${version}"; 27 hash = "sha256-kQBW8bN8WYvWzpqM6JatB3bB/bAQqpHGd98prznyO+g="; 28 }; 29 30 nativeBuildInputs = [ setuptools ]; 31 32 dependencies = [ 33 jinja2 34 pygments 35 markupsafe 36 ] ++ lib.optional (pythonOlder "3.9") astunparse; 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 pytestFlagsArray = [ 50 ''-m "not slow"'' # skip slow tests 51 ]; 52 53 __darwinAllowLocalNetworking = true; 54 55 pythonImportsCheck = [ "pdoc" ]; 56 57 meta = with lib; { 58 changelog = "https://github.com/mitmproxy/pdoc/blob/${src.rev}/CHANGELOG.md"; 59 homepage = "https://pdoc.dev/"; 60 description = "API Documentation for Python Projects"; 61 mainProgram = "pdoc"; 62 license = licenses.unlicense; 63 maintainers = with maintainers; [ pbsds ]; 64 }; 65}