1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 fetchpatch,
7
8 # build-system
9 setuptools,
10
11 # dependencies
12 flask,
13
14 # tests
15 markdown,
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "flask-api";
21 version = "3.1";
22 pyproject = true;
23
24 disabled = pythonOlder "3.6";
25
26 src = fetchFromGitHub {
27 owner = "flask-api";
28 repo = "flask-api";
29 tag = "v${version}";
30 hash = "sha256-nHgeI5FLKkDp4uWO+0eaT4YSOMkeQ0wE3ffyJF+WzTM=";
31 };
32
33 patches = [
34 (fetchpatch {
35 # werkzeug 3.0 support
36 url = "https://github.com/flask-api/flask-api/commit/9c998897f67d8aa959dc3005d7d22f36568b6938.patch";
37 hash = "sha256-vaCZ4gVlfQXyeksA44ydkjz2FxODHt3gTTP+ukJwEGY=";
38 })
39 ];
40
41 nativeBuildInputs = [ setuptools ];
42
43 propagatedBuildInputs = [ flask ];
44
45 nativeCheckInputs = [
46 markdown
47 pytestCheckHook
48 ];
49
50 meta = with lib; {
51 homepage = "https://github.com/flask-api/flask-api";
52 changelog = "https://github.com/flask-api/flask-api/releases/tag/v${version}";
53 description = "Browsable web APIs for Flask";
54 license = licenses.bsd2;
55 maintainers = with maintainers; [ nickcao ];
56 };
57}