1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 brotlicffi, 11 decorator, 12 flasgger, 13 flask, 14 greenlet, 15 six, 16 werkzeug, 17 18 # optional-dependencies 19 gunicorn, 20 gevent, 21 22 # tests 23 pytestCheckHook, 24}: 25 26buildPythonPackage rec { 27 pname = "httpbin"; 28 version = "0.10.2"; 29 format = "pyproject"; 30 31 src = fetchPypi { 32 inherit pname version; 33 hash = "sha256-YyFIaYJhyGhOotK2JM3qhFtAKx/pFzbonfiGQIxjF6k="; 34 }; 35 36 nativeBuildInputs = [ 37 setuptools 38 ]; 39 40 pythonRelaxDeps = [ "greenlet" ]; 41 42 propagatedBuildInputs = [ 43 brotlicffi 44 decorator 45 flask 46 flasgger 47 greenlet 48 six 49 werkzeug 50 ]; 51 52 optional-dependencies = { 53 mainapp = [ 54 gunicorn 55 gevent 56 ]; 57 }; 58 59 nativeCheckInputs = [ pytestCheckHook ]; 60 61 disabledTests = [ 62 # Tests seems to be outdated 63 "test_anything" 64 "test_get" 65 "test_redirect_n_equals_to_1" 66 "test_redirect_n_higher_than_1" 67 "test_redirect_to_post" 68 "test_relative_redirect_n_equals_to_1" 69 "test_relative_redirect_n_higher_than_1" 70 ]; 71 72 pythonImportsCheck = [ "httpbin" ]; 73 74 meta = with lib; { 75 description = "HTTP Request and Response Service"; 76 homepage = "https://github.com/psf/httpbin"; 77 license = licenses.mit; 78 maintainers = [ ]; 79 }; 80}