2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flask,
|
|
|
|
werkzeug,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flask-reverse-proxy-fix";
|
|
|
|
version = "0.2.1";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-ZRZI1psr1dnY2FbuLZXOQvLMJd4TF7BfBNZnW9kxeck=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's@werkzeug.contrib.fixers@werkzeug.middleware.proxy_fix@g' flask_reverse_proxy_fix/middleware/__init__.py
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# This is needed so that setup.py does not add "devNone" to the version,
|
|
|
|
# after which setuptools throws an error for an invalid version.
|
|
|
|
env.CI_COMMIT_TAG = "v${version}";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
flask
|
2020-07-18 16:06:22 +00:00
|
|
|
werkzeug
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00: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/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|