summary refs log tree commit diff
path: root/pkgs/development/python-modules/keras-applications/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/keras-applications/default.nix')
-rw-r--r--pkgs/development/python-modules/keras-applications/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/keras-applications/default.nix b/pkgs/development/python-modules/keras-applications/default.nix
new file mode 100644
index 00000000000..e06a0b75b50
--- /dev/null
+++ b/pkgs/development/python-modules/keras-applications/default.nix
@@ -0,0 +1,27 @@
+{ lib, buildPythonPackage, fetchPypi, numpy, h5py }:
+
+buildPythonPackage rec {
+  pname = "Keras_Applications";
+  version = "1.0.4";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "8c95300328630ae74fb0828b6fa38269a25c0228a02f1e5181753bfd48961f49";
+  };
+
+  # Cyclic dependency: keras-applications requires keras, which requires keras-applications
+  postPatch = ''
+    sed -i "s/keras>=[^']*//" setup.py
+  '';
+
+  # No tests in PyPI tarball
+  doCheck = false;
+
+  propagatedBuildInputs = [ numpy h5py ];
+
+  meta = with lib; {
+    description = "Reference implementations of popular deep learning models";
+    homepage = https://github.com/keras-team/keras-applications;
+    license = licenses.mit;
+  };
+}