2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-04-02 12:25:29 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy3k
|
|
|
|
, flask
|
2020-06-23 20:53:38 +01:00
|
|
|
, werkzeug
|
2020-04-02 12:25:29 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flask-reverse-proxy-fix";
|
|
|
|
version = "0.2.1";
|
|
|
|
|
|
|
|
# master fixes flask import syntax and has no major changes
|
|
|
|
# new release requested: https://github.com/sublee/flask-silk/pull/6
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "antarctica";
|
|
|
|
repo = "flask-reverse-proxy-fix";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1jbr67cmnryn0igv05qkvqjwrwj2rsajvvjnv3cdkm9bkgb4h5k5";
|
|
|
|
};
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2020-06-23 20:53:38 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's@werkzeug.contrib.fixers@werkzeug.middleware.proxy_fix@g' flask_reverse_proxy_fix/middleware/__init__.py
|
|
|
|
'';
|
|
|
|
|
2020-04-02 12:25:29 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
flask
|
2020-06-23 20:53:38 +01:00
|
|
|
werkzeug
|
2020-04-02 12:25:29 +01:00
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-02 12:25:29 +01:00
|
|
|
description = "Python Flask middleware for applications running under a reverse proxy";
|
|
|
|
maintainers = with maintainers; [ matthiasbeyer ];
|
|
|
|
homepage = "https://github.com/antarctica/flask-reverse-proxy-fix";
|
|
|
|
|
|
|
|
license = {
|
|
|
|
fullName = "Open Government Licence";
|
|
|
|
url = "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|