1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, flask 5, jsonschema 6, pytestCheckHook 7}: 8 9buildPythonPackage rec { 10 pname = "flask-expects-json"; 11 version = "1.7.0"; 12 format = "setuptools"; 13 14 src = fetchFromGitHub { 15 owner = "Fischerfredl"; 16 repo = pname; 17 rev = version; 18 hash = "sha256-CUxuwqjjAb9Fy6xWtX1WtSANYaYr5//vY8k89KghYoQ="; 19 }; 20 21 propagatedBuildInputs = [ 22 flask 23 jsonschema 24 ] ++ flask.optional-dependencies.async; 25 26 nativeCheckInputs = [ 27 pytestCheckHook 28 ]; 29 30 pythonImportsCheck = [ 31 "flask_expects_json" 32 ]; 33 34 disabledTests = [ 35 # https://github.com/Fischerfredl/flask-expects-json/issues/26 36 "test_check_mimetype" 37 "test_default_behaviour" 38 "test_default_gets_validated" 39 "test_format_validation_rejection" 40 "test_ignore_multiple" 41 "test_ignore_one" 42 "test_valid_decorator_no_schema_async" 43 "test_valid_decorator" 44 "test_validation_invalid" 45 ]; 46 47 meta = with lib; { 48 homepage = "https://github.com/fischerfredl/flask-expects-json"; 49 description = "Decorator for REST endpoints in flask. Validate JSON request data."; 50 license = licenses.mit; 51 maintainers = []; 52 }; 53}