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