1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, flask 5, werkzeug 6}: 7 8buildPythonPackage rec { 9 pname = "flask-reverse-proxy-fix"; 10 version = "0.2.1"; 11 format = "setuptools"; 12 13 # master fixes flask import syntax and has no major changes 14 # new release requested: https://github.com/sublee/flask-silk/pull/6 15 src = fetchFromGitHub { 16 owner = "antarctica"; 17 repo = "flask-reverse-proxy-fix"; 18 rev = "v${version}"; 19 hash = "sha256-ZRZI1psr1dnY2FbuLZXOQvLMJd4TF7BfBNZnW9kxeck="; 20 }; 21 22 postPatch = '' 23 sed -i 's@werkzeug.contrib.fixers@werkzeug.middleware.proxy_fix@g' flask_reverse_proxy_fix/middleware/__init__.py 24 ''; 25 26 # This is needed so that setup.py does not add "devNone" to the version, 27 # after which setuptools throws an error for an invalid version. 28 env.CI_COMMIT_TAG = "v${version}"; 29 30 propagatedBuildInputs = [ 31 flask 32 werkzeug 33 ]; 34 35 meta = with lib; { 36 description = "Python Flask middleware for applications running under a reverse proxy"; 37 maintainers = with maintainers; [ matthiasbeyer ]; 38 homepage = "https://github.com/antarctica/flask-reverse-proxy-fix"; 39 40 license = { 41 fullName = "Open Government Licence"; 42 url = "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"; 43 }; 44 }; 45}