From 7ccceeaccafccf764f7aca0feb616b5022d5b148 Mon Sep 17 00:00:00 2001 From: hyphon81 Date: Thu, 28 Dec 2017 17:43:19 +0100 Subject: [PATCH] pythonPackages.chainer: init at 3.2.0 --- .../python-modules/chainer/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 3 ++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/chainer/default.nix diff --git a/pkgs/development/python-modules/chainer/default.nix b/pkgs/development/python-modules/chainer/default.nix new file mode 100644 index 000000000000..06a455176a2a --- /dev/null +++ b/pkgs/development/python-modules/chainer/default.nix @@ -0,0 +1,36 @@ +{ stdenv, lib, python +, buildPythonPackage, fetchPypi, isPy3k +, filelock, protobuf, numpy, pytest, mock +, cupy, cudaSupport ? false +}: + +buildPythonPackage rec { + pname = "chainer"; + version = "3.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0mbc8kwk7pvg03bf0j57a48gr6rsdg4lzmyj0dak8y2l4lmyskpw"; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cd565923431c..d277ae430468 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1467,6 +1467,9 @@ in { substituteInPlace setup.py --replace "argparse" "" ''; + chainer = callPackage ../development/python-modules/chainer { + cudaSupport = pkgs.config.cudaSupport or false; + }; channels = callPackage ../development/python-modules/channels {};