diff --git a/pkgs/development/python-modules/chainer/default.nix b/pkgs/development/python-modules/chainer/default.nix index 0ca1a2343941..789b0594c152 100644 --- a/pkgs/development/python-modules/chainer/default.nix +++ b/pkgs/development/python-modules/chainer/default.nix @@ -7,18 +7,19 @@ fetchFromGitHub, filelock, mock, - numpy, protobuf, pytestCheckHook, pythonOlder, six, + setuptools, + numpy, typing-extensions, }: buildPythonPackage rec { pname = "chainer"; version = "7.8.1.post1"; - format = "setuptools"; + build-system = [ setuptools ]; disabled = pythonOlder "3.7"; @@ -29,12 +30,18 @@ buildPythonPackage rec { hash = "sha256-epwnExmyCWmwaOz+mJnAl1peEeHLBdQGC62BlLfSTQQ="; }; - propagatedBuildInputs = [ + postPatch = '' + substituteInPlace chainer/_environment_check.py \ + --replace-fail "import numpy.distutils.system_info" "import numpy" \ + --replace-fail "numpy.distutils.system_info" "numpy.__config__.get_info" + ''; + + dependencies = [ filelock - numpy protobuf six typing-extensions + numpy ] ++ lib.optionals cudaSupport [ cupy ]; nativeCheckInputs = [ @@ -60,10 +67,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "chainer" ]; - meta = with lib; { + meta = { description = "Flexible framework of neural networks for deep learning"; homepage = "https://chainer.org/"; - license = licenses.mit; - maintainers = with maintainers; [ hyphon81 ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hyphon81 ]; }; }