about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/essentials-openapi/default.nix
blob: 5fc8251476566c4ca36fa464f11a15462300b983 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  click,
  essentials,
  flask,
  hatchling,
  httpx,
  jinja2,
  markupsafe,
  pydantic,
  pytestCheckHook,
  pythonImportsCheckHook,
  pyyaml,
  rich,
  setuptools
}:
buildPythonPackage rec {
  pname = "essentials-openapi";
  version = "1.0.9";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Neoteroi";
    repo = "essentials-openapi";
    rev = "refs/tags/v${version}";
    hash = "sha256-/NYv0NrE8+0kQg5G3Qf2DtesMHlmKQYczNT8pFlNFZE=";
  };

  nativeBuildInputs = [
    hatchling
  ];

  nativeCheckInputs = [
    flask
    httpx
    pydantic
    pytestCheckHook
    rich
    setuptools
  ];

  propagatedBuildInputs = [
    pyyaml
    essentials
    markupsafe
  ];

  passthru.optional-dependencies = {
    full = [ click jinja2 rich httpx ];
  };

  pythonImportsCheck = [
    "openapidocs"
  ];

  meta = with lib; {
    homepage = "https://github.com/Neoteroi/essentials-openapi";
    description = "Functions to handle OpenAPI Documentation";
    changelog = "https://github.com/Neoteroi/essentials-openapi/releases/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [aldoborrero zimbatm];
  };
}