1{ stdenv, lib, python
2, buildPythonPackage, fetchPypi, isPy3k
3, filelock, protobuf, numpy, pytest, mock
4, cupy, cudaSupport ? false
5}:
6
7buildPythonPackage rec {
8 pname = "chainer";
9 version = "3.3.0";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "0669375e5b09d687781a37d6c025ee0a6015f575b4d2c70a2ad09c33b8228f86";
14 };
15
16 checkInputs = [
17 pytest
18 mock
19 ];
20
21 propagatedBuildInputs = [
22 filelock
23 protobuf
24 numpy
25 ] ++ lib.optionals cudaSupport [ cupy ];
26
27 # In python3, test was failed...
28 doCheck = !isPy3k;
29
30 meta = with stdenv.lib; {
31 description = "A flexible framework of neural networks for deep learning";
32 homepage = https://chainer.org/;
33 license = licenses.mit;
34 maintainers = with maintainers; [ hyphon81 ];
35 };
36}