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