summary refs log tree commit diff
path: root/pkgs/development/python-modules/bravado-core/default.nix
blob: 19d3791bed593b81ab8624957e696eccf04e6787 (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
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, python-dateutil, jsonref, jsonschema,
  pyyaml, simplejson, six, pytz, msgpack, swagger-spec-validator, rfc3987,
  strict-rfc3339, webcolors, mypy-extensions, jsonpointer, idna, pytest, mock,
  pytest-benchmark, isPy27, enum34 }:

buildPythonPackage rec {
  pname = "bravado-core";
  version = "5.17.0";

  src = fetchFromGitHub {
    owner = "Yelp";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-okQA4YJq0lyVJuDzD8mMRlOS/K3gf1qRUpw/5M0LlZE=";
  };

  checkInputs = [
    mypy-extensions
    pytest
    mock
    pytest-benchmark
  ];

  checkPhase = "pytest --benchmark-skip";

  propagatedBuildInputs = [
    python-dateutil
    jsonref
    jsonschema
    pyyaml
    simplejson
    six
    pytz
    msgpack
    swagger-spec-validator

    # the following 3 packages are included when jsonschema (3.2) is installed
    # as jsonschema[format], which reflects what happens in setup.py
    rfc3987
    strict-rfc3339
    webcolors
    jsonpointer
    idna
  ] ++ lib.optionals isPy27 [ enum34 ];

  meta = with lib; {
    broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
    description = "Library for adding Swagger support to clients and servers";
    homepage = "https://github.com/Yelp/bravado-core";
    license = licenses.bsd3;
    maintainers = with maintainers; [ vanschelven ];
  };
}