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