nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 81 lines 2.0 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, aniso8601 6, jsonschema 7, flask 8, werkzeug 9, pytz 10, faker 11, six 12, mock 13, blinker 14, pytest-flask 15, pytest-mock 16, pytest-benchmark 17, pytestCheckHook 18}: 19 20buildPythonPackage rec { 21 pname = "flask-restx"; 22 version = "0.5.1"; 23 24 # Tests not included in PyPI tarball 25 src = fetchFromGitHub { 26 owner = "python-restx"; 27 repo = pname; 28 rev = version; 29 sha256 = "18vrmknyxw6adn62pz3kr9kvazfgjgl4pgimdf8527fyyiwcqy15"; 30 }; 31 32 patches = [ 33 # Fixes werkzeug 2.1 compatibility 34 (fetchpatch { 35 # https://github.com/python-restx/flask-restx/pull/427 36 url = "https://github.com/python-restx/flask-restx/commit/bb72a51860ea8a42c928f69bdd44ad20b1f9ee7e.patch"; 37 hash = "sha256-DRH3lI6TV1m0Dq1VyscL7GQS26OOra9g88dXZNrNpmQ="; 38 }) 39 (fetchpatch { 40 # https://github.com/python-restx/flask-restx/pull/427 41 url = "https://github.com/python-restx/flask-restx/commit/bb3e9dd83b9d4c0d0fa0de7d7ff713fae71eccee.patch"; 42 hash = "sha256-HJpjG4aQWzEPCMfbXfkw4mz5TH9d89BCvGH2dE6Jfv0="; 43 }) 44 ]; 45 46 propagatedBuildInputs = [ 47 aniso8601 48 flask 49 jsonschema 50 pytz 51 six 52 werkzeug 53 ]; 54 55 checkInputs = [ 56 blinker 57 faker 58 mock 59 pytest-benchmark 60 pytest-flask 61 pytest-mock 62 pytestCheckHook 63 ]; 64 65 pytestFlagsArray = [ 66 "--benchmark-disable" 67 "--deselect=tests/test_inputs.py::URLTest::test_check" 68 "--deselect=tests/test_inputs.py::EmailTest::test_valid_value_check" 69 "--deselect=tests/test_logging.py::LoggingTest::test_override_app_level" 70 ]; 71 72 pythonImportsCheck = [ "flask_restx" ]; 73 74 meta = with lib; { 75 homepage = "https://flask-restx.readthedocs.io/en/${version}/"; 76 description = "Fully featured framework for fast, easy and documented API development with Flask"; 77 changelog = "https://github.com/python-restx/flask-restx/raw/${version}/CHANGELOG.rst"; 78 license = licenses.bsd3; 79 maintainers = [ maintainers.marsam ]; 80 }; 81}