about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/flask-restx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/flask-restx/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/flask-restx/default.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/flask-restx/default.nix b/nixpkgs/pkgs/development/python-modules/flask-restx/default.nix
index e1de7bf0d3b3..4d0d89d0f146 100644
--- a/nixpkgs/pkgs/development/python-modules/flask-restx/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/flask-restx/default.nix
@@ -20,16 +20,23 @@
 
 buildPythonPackage rec {
   pname = "flask-restx";
-  version = "0.3.0";
+  version = "0.4.0";
 
   # Tests not included in PyPI tarball
   src = fetchFromGitHub {
     owner = "python-restx";
     repo = pname;
     rev = version;
-    sha256 = "0aj13nd3z71gb8c2kqiaz3f9k7jr0srlvrsx8hpz4nkpki8jiz2s";
+    sha256 = "sha256-jM0QJ/klbWh3qho6ZQOH2n1qaguK9C98QIuSfqpI8xA=";
   };
 
+  postPatch = ''
+    # https://github.com/python-restx/flask-restx/pull/341
+    substituteInPlace requirements/install.pip \
+      --replace "Flask>=0.8, <2.0.0" "Flask>=0.8, !=2.0.0" \
+      --replace "werkzeug <2.0.0" "werkzeug !=2.0.0"
+  '';
+
   propagatedBuildInputs = [ aniso8601 jsonschema flask werkzeug pytz six ]
     ++ lib.optionals isPy27 [ enum34 ];
 
@@ -42,6 +49,8 @@ buildPythonPackage rec {
     "--deselect=tests/test_logging.py::LoggingTest::test_override_app_level"
   ];
 
+  pythonImportCheck = [ "flask_restx" ];
+
   meta = with lib; {
     homepage = "https://flask-restx.readthedocs.io/en/${version}/";
     description = "Fully featured framework for fast, easy and documented API development with Flask";