1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 flask, 6 flask-sqlalchemy, 7 flit-core, 8 marshmallow, 9 marshmallow-sqlalchemy, 10 pytestCheckHook, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "flask-marshmallow"; 16 version = "1.3.0"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.9"; 20 21 src = fetchFromGitHub { 22 owner = "marshmallow-code"; 23 repo = "flask-marshmallow"; 24 tag = version; 25 hash = "sha256-dK2bE5mZiFh0nAN2yRpABT+SGG/UGWJ1oDtnD6bgyXk="; 26 }; 27 28 build-system = [ flit-core ]; 29 30 dependencies = [ 31 flask 32 marshmallow 33 ]; 34 35 optional-dependencies = { 36 sqlalchemy = [ 37 flask-sqlalchemy 38 marshmallow-sqlalchemy 39 ]; 40 }; 41 42 nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.sqlalchemy; 43 44 pythonImportsCheck = [ "flask_marshmallow" ]; 45 46 pytestFlags = [ 47 "-Wignore::DeprecationWarning" 48 ]; 49 50 meta = { 51 description = "Flask + marshmallow for beautiful APIs"; 52 homepage = "https://github.com/marshmallow-code/flask-marshmallow"; 53 changelog = "https://github.com/marshmallow-code/flask-marshmallow/releases/tag/${version}"; 54 license = lib.licenses.mit; 55 maintainers = with lib.maintainers; [ nickcao ]; 56 }; 57}