1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, isPy3k
5, flask
6, werkzeug
7}:
8
9buildPythonPackage rec {
10 pname = "flask-reverse-proxy-fix";
11 version = "0.2.1";
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 sha256 = "1jbr67cmnryn0igv05qkvqjwrwj2rsajvvjnv3cdkm9bkgb4h5k5";
20 };
21
22 disabled = !isPy3k;
23
24 postPatch = ''
25 sed -i 's@werkzeug.contrib.fixers@werkzeug.middleware.proxy_fix@g' flask_reverse_proxy_fix/middleware/__init__.py
26 '';
27
28 propagatedBuildInputs = [
29 flask
30 werkzeug
31 ];
32
33 meta = with lib; {
34 description = "Python Flask middleware for applications running under a reverse proxy";
35 maintainers = with maintainers; [ matthiasbeyer ];
36 homepage = "https://github.com/antarctica/flask-reverse-proxy-fix";
37
38 license = {
39 fullName = "Open Government Licence";
40 url = "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/";
41 };
42 };
43}