nixpkgs/pkgs/development/python-modules/flask-reverse-proxy-fix/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

46 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
flask,
werkzeug,
}:
buildPythonPackage rec {
pname = "flask-reverse-proxy-fix";
version = "0.2.1";
format = "setuptools";
# 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}";
hash = "sha256-ZRZI1psr1dnY2FbuLZXOQvLMJd4TF7BfBNZnW9kxeck=";
};
postPatch = ''
sed -i 's@werkzeug.contrib.fixers@werkzeug.middleware.proxy_fix@g' flask_reverse_proxy_fix/middleware/__init__.py
'';
# 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}";
propagatedBuildInputs = [
flask
werkzeug
];
meta = with lib; {
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/";
};
};
}