Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 aniso8601, 4 blinker, 5 buildPythonPackage, 6 fetchPypi, 7 flask, 8 mock, 9 nose, 10 pytestCheckHook, 11 pythonOlder, 12 pytz, 13 six, 14 werkzeug, 15}: 16 17buildPythonPackage rec { 18 pname = "flask-restful"; 19 version = "0.3.10"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchPypi { 25 pname = "Flask-RESTful"; 26 inherit version; 27 hash = "sha256-/kry7wAn34+bT3l6uiDFVmgBtq3plaxjtYir8aWc7Dc="; 28 }; 29 30 # conditional so that overrides are easier for web applications 31 patches = 32 lib.optionals (lib.versionAtLeast werkzeug.version "2.1.0") [ ./werkzeug-2.1.0-compat.patch ] 33 ++ lib.optionals (lib.versionAtLeast flask.version "3.0.0") [ ./flask-3.0-compat.patch ]; 34 35 propagatedBuildInputs = [ 36 aniso8601 37 flask 38 pytz 39 six 40 ]; 41 42 nativeCheckInputs = [ 43 blinker 44 mock 45 nose 46 pytestCheckHook 47 ]; 48 49 disabledTests = [ 50 # Broke in flask 2.2 upgrade 51 "test_exception_header_forwarded" 52 # Broke in werkzeug 2.3 upgrade 53 "test_media_types_method" 54 "test_media_types_q" 55 ]; 56 57 pythonImportsCheck = [ "flask_restful" ]; 58 59 meta = with lib; { 60 description = "Framework for creating REST APIs"; 61 homepage = "https://flask-restful.readthedocs.io"; 62 longDescription = '' 63 Flask-RESTful provides the building blocks for creating a great 64 REST API. 65 ''; 66 license = licenses.bsd3; 67 maintainers = [ ]; 68 }; 69}