summary refs log tree commit diff
path: root/pkgs/development/python-modules/keras/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/keras/default.nix')
-rw-r--r--pkgs/development/python-modules/keras/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix
index ea699c9c04a9..83ef23282797 100644
--- a/pkgs/development/python-modules/keras/default.nix
+++ b/pkgs/development/python-modules/keras/default.nix
@@ -6,11 +6,11 @@
 
 buildPythonPackage rec {
   pname = "Keras";
-  version = "2.2.2";
+  version = "2.2.4";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "468d98da104ec5c3dbb10c2ef6bb345ab154f6ca2d722d4c250ef4d6105de17a";
+    sha256 = "90b610a3dbbf6d257b20a079eba3fdf2eed2158f64066a7c6f7227023fd60bc9";
   };
 
   checkInputs = [
@@ -25,6 +25,14 @@ buildPythonPackage rec {
     keras-applications keras-preprocessing
   ];
 
+  # Keras 2.2.2 expects older versions of keras_applications
+  # and keras_preprocessing. These substitutions can be removed
+  # for for the next Keras release.
+  postPatch = ''
+    substituteInPlace setup.py --replace "keras_applications==1.0.4" "keras_applications==1.0.5"
+    substituteInPlace setup.py --replace "keras_preprocessing==1.0.2" "keras_preprocessing==1.0.3"
+  '';
+
   # Couldn't get tests working
   doCheck = false;