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