summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/aiohttp-apispec/default.nix
blob: 78758f59680d15eafa08aa7c3b3da7f850c36efe (plain)
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
{
  lib,
  aiohttp,
  apispec,
  buildPythonPackage,
  fetchFromGitHub,
  jinja2,
  packaging,
  pytest-aiohttp,
  pytestCheckHook,
  setuptools,
  webargs,
}:

buildPythonPackage rec {
  pname = "aiohttp-apispec";
  version = "3.0.0b2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "maximdanilchenko";
    repo = "aiohttp-apispec";
    tag = "v${version}";
    hash = "sha256-C+/M25oCLTNGGEUj2EyXn3UjcvPvDYFmmUW8IOoF1uU=";
  };

  doCheck = false;

  /*
    postPatch = ''
      substituteInPlace tests/conftest.py \
        --replace-fail 'aiohttp_app(loop,' 'aiohttp_app(event_loop,' \
        --replace-fail 'return loop.run_until_complete' 'return event_loop.run_until_complete'
    '';
  */

  build-system = [ setuptools ];

  dependencies = [
    aiohttp
    apispec
    jinja2
    packaging
    webargs
  ];

  nativeCheckInputs = [
    pytest-aiohttp
    pytestCheckHook
  ];

  pythonImportsCheck = [ "aiohttp_apispec" ];

  meta = {
    description = "Build and document REST APIs with aiohttp and apispec";
    homepage = "https://github.com/maximdanilchenko/aiohttp-apispec/";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}