about summary refs log tree commit diff
path: root/pkgs/development/python-modules/httpbin/default.nix
blob: a4e867d981716db66e01be858a852cc56e4db25c (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
  lib,
  buildPythonPackage,
  fetchPypi,

  # build-system
  setuptools,

  # dependencies
  brotlicffi,
  decorator,
  flasgger,
  flask,
  greenlet,
  six,
  werkzeug,

  # optional-dependencies
  gunicorn,
  gevent,

  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "httpbin";
  version = "0.10.2";
  format = "pyproject";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-YyFIaYJhyGhOotK2JM3qhFtAKx/pFzbonfiGQIxjF6k=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  pythonRelaxDeps = [ "greenlet" ];

  propagatedBuildInputs = [
    brotlicffi
    decorator
    flask
    flasgger
    greenlet
    six
    werkzeug
  ];

  passthru.optional-dependencies = {
    mainapp = [
      gunicorn
      gevent
    ];
  };

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = [
    # Tests seems to be outdated
    "test_anything"
    "test_get"
    "test_redirect_n_equals_to_1"
    "test_redirect_n_higher_than_1"
    "test_redirect_to_post"
    "test_relative_redirect_n_equals_to_1"
    "test_relative_redirect_n_higher_than_1"
  ];

  pythonImportsCheck = [ "httpbin" ];

  meta = with lib; {
    description = "HTTP Request and Response Service";
    homepage = "https://github.com/psf/httpbin";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}