about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-11-12 16:28:54 +0100
committerTimo Kaufmann <timokau@zoho.com>2019-11-12 23:43:10 +0100
commit4fb7831cb4c97f0dc949004a34de72e6ec7d3ec1 (patch)
tree879463b98ffe0488b58e2e77504e70600c313ec5
parent1fbd307880425b568fa949490d60f9b987ab2458 (diff)
downloadnixlib-4fb7831cb4c97f0dc949004a34de72e6ec7d3ec1.tar
nixlib-4fb7831cb4c97f0dc949004a34de72e6ec7d3ec1.tar.gz
nixlib-4fb7831cb4c97f0dc949004a34de72e6ec7d3ec1.tar.bz2
nixlib-4fb7831cb4c97f0dc949004a34de72e6ec7d3ec1.tar.lz
nixlib-4fb7831cb4c97f0dc949004a34de72e6ec7d3ec1.tar.xz
nixlib-4fb7831cb4c97f0dc949004a34de72e6ec7d3ec1.tar.zst
nixlib-4fb7831cb4c97f0dc949004a34de72e6ec7d3ec1.zip
python.pkgs.tensorflow: fix build with newer gast
-rw-r--r--pkgs/development/python-modules/tensorflow/default.nix8
-rw-r--r--pkgs/development/python-modules/tensorflow/lift-gast-restriction.patch13
2 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix
index b3d9d8659086..469ae6fe3d69 100644
--- a/pkgs/development/python-modules/tensorflow/default.nix
+++ b/pkgs/development/python-modules/tensorflow/default.nix
@@ -114,6 +114,14 @@ let
       })
 
       ./tf-1.15-bazel-1.0.patch
+
+      (fetchpatch {
+        # be compatible with gast >0.2 instead of only gast 0.2.2
+        name = "gast-update.patch";
+        url = "https://github.com/tensorflow/tensorflow/commit/85751ad6c7f5fd12c6c79545d96896cba92fa8b4.patch";
+        sha256 = "077cpj0kzyqxzdya1dwh8df17zfzhqn7c685hx6iskvw2979zg2n";
+      })
+      ./lift-gast-restriction.patch
     ];
 
     # On update, it can be useful to steal the changes from gentoo
diff --git a/pkgs/development/python-modules/tensorflow/lift-gast-restriction.patch b/pkgs/development/python-modules/tensorflow/lift-gast-restriction.patch
new file mode 100644
index 000000000000..24cc118d8f33
--- /dev/null
+++ b/pkgs/development/python-modules/tensorflow/lift-gast-restriction.patch
@@ -0,0 +1,13 @@
+diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py
+index 992f2eae22..d9386f9b13 100644
+--- a/tensorflow/tools/pip_package/setup.py
++++ b/tensorflow/tools/pip_package/setup.py
+@@ -54,7 +54,7 @@ REQUIRED_PACKAGES = [
+     'astor >= 0.6.0',
+     'backports.weakref >= 1.0rc1;python_version<"3.4"',
+     'enum34 >= 1.1.6;python_version<"3.4"',
+-    'gast == 0.2.2',
++    'gast >= 0.2.2',
+     'google_pasta >= 0.1.6',
+     'keras_applications >= 1.0.8',
+     'keras_preprocessing >= 1.0.5',