nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 52 lines 1.2 kB view raw
1{ config, lib, buildPythonPackage, fetchFromGitHub, isPy3k 2, filelock, protobuf, numpy, pytestCheckHook, mock, typing-extensions 3, cupy, cudaSupport ? config.cudaSupport or false 4}: 5 6buildPythonPackage rec { 7 pname = "chainer"; 8 version = "7.8.1"; 9 disabled = !isPy3k; # python2.7 abandoned upstream 10 11 src = fetchFromGitHub { 12 owner = "chainer"; 13 repo = "chainer"; 14 rev = "v${version}"; 15 sha256 = "1n07zjzc4g92m1sbgxvnansl0z00y4jnhma2mw06vnahs7s9nrf6"; 16 }; 17 18 propagatedBuildInputs = [ 19 filelock 20 protobuf 21 numpy 22 typing-extensions 23 ] ++ lib.optionals cudaSupport [ cupy ]; 24 25 checkInputs = [ 26 pytestCheckHook 27 mock 28 ]; 29 30 pytestFlagsArray = [ "tests/chainer_tests/utils_tests" ]; 31 32 preCheck = '' 33 # cf. https://github.com/chainer/chainer/issues/8621 34 export CHAINER_WARN_VERSION_MISMATCH=0 35 36 # ignore pytest warnings not listed 37 rm setup.cfg 38 ''; 39 40 disabledTests = [ 41 "gpu" 42 "cupy" 43 "ideep" 44 ]; 45 46 meta = with lib; { 47 description = "A flexible framework of neural networks for deep learning"; 48 homepage = "https://chainer.org/"; 49 license = licenses.mit; 50 maintainers = with maintainers; [ hyphon81 ]; 51 }; 52}