1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5
6# dependencies
7, flask
8, jsonschema
9, mistune
10, pyyaml
11, six
12, werkzeug
13
14# tests
15, pytestCheckHook
16}:
17
18buildPythonPackage rec {
19 pname = "flasgger";
20 version = "0.9.5";
21 format = "setuptools";
22
23 src = fetchFromGitHub {
24 owner = "flasgger";
25 repo = "flasgger";
26 rev = version;
27 hash = "sha256-cYFMKZxpi69gVWqyZUltCL0ZwcfIABNsJKqAhN2TTSg=";
28 };
29
30 patches = [
31 (fetchpatch {
32 # flask 2.3 compat
33 url = "https://github.com/flasgger/flasgger/commit/ab77be7c6de1d4b361f0eacfa37290239963f890.patch";
34 hash = "sha256-ZbE5pPUP23nZAP/qcdeWkwzrZgqJSRES7oFta8U1uVQ=";
35 })
36 ];
37
38 propagatedBuildInputs = [
39 flask
40 jsonschema
41 mistune
42 pyyaml
43 six
44 werkzeug
45 ];
46
47 pythonImportsCheck = [
48 "flasgger"
49 ];
50
51 nativeCheckInputs = [
52 pytestCheckHook
53 ];
54
55 doCheck = false; # missing flex dependency
56
57 meta = with lib; {
58 description = "Easy OpenAPI specs and Swagger UI for your Flask API";
59 homepage = "https://github.com/flasgger/flasgger/";
60 license = licenses.mit;
61 maintainers = with maintainers; [ ];
62 };
63}