about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/chainer/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/chainer/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/chainer/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/chainer/default.nix b/nixpkgs/pkgs/development/python-modules/chainer/default.nix
new file mode 100644
index 000000000000..42e24dedba29
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/chainer/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib
+, buildPythonPackage, fetchPypi, isPy3k
+, filelock, protobuf, numpy, pytest, mock
+, cupy, cudaSupport ? false
+}:
+
+buildPythonPackage rec {
+  pname = "chainer";
+  version = "5.2.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "cc8390a7f445a14a1bc71d54de348be247158fe2813a5ef11c5046265001c8c4";
+  };
+
+  checkInputs = [
+    pytest
+    mock
+  ];
+
+  propagatedBuildInputs = [
+    filelock
+    protobuf
+    numpy
+  ] ++ lib.optionals cudaSupport [ cupy ];
+
+  # In python3, test was failed...
+  doCheck = !isPy3k;
+
+  meta = with stdenv.lib; {
+    description = "A flexible framework of neural networks for deep learning";
+    homepage = https://chainer.org/;
+    license = licenses.mit;
+    maintainers = with maintainers; [ hyphon81 ];
+  };
+}