Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / flask-reverse-proxy-fix / default.nix
blob18e483292885bc10a92f64888ed16f840b34ae20
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , isPy3k
5 , flask
6 , werkzeug
7 }:
9 buildPythonPackage rec {
10   pname = "flask-reverse-proxy-fix";
11   version = "0.2.1";
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   };
22   disabled = !isPy3k;
24   postPatch = ''
25     sed -i 's@werkzeug.contrib.fixers@werkzeug.middleware.proxy_fix@g' flask_reverse_proxy_fix/middleware/__init__.py
26   '';
28   propagatedBuildInputs = [
29     flask
30     werkzeug
31   ];
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";
38     license = {
39       fullName = "Open Government Licence";
40       url = "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/";
41     };
42   };