From a5f795f79e47adc4ed7148624ffff227f04be7eb Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 23 May 2023 13:23:28 +0300 Subject: [PATCH] python310Packages.dm-sonnet: fix build --- .../python-modules/dm-sonnet/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/dm-sonnet/default.nix b/pkgs/development/python-modules/dm-sonnet/default.nix index 0f1518d6e5a..1947a07b835 100644 --- a/pkgs/development/python-modules/dm-sonnet/default.nix +++ b/pkgs/development/python-modules/dm-sonnet/default.nix @@ -1,10 +1,11 @@ { lib -, absl-py , buildPythonPackage +, click , dm-tree , docutils , etils , fetchFromGitHub +, fetchpatch , numpy , pythonOlder , tabulate @@ -27,6 +28,14 @@ buildPythonPackage rec { hash = "sha256-YSMeH5ZTfP1OdLBepsxXAVczBG/ghSjCWjoz/I+TFl8="; }; + patches = [ + (fetchpatch { + name = "replace-np-bool-with-np-bool_.patch"; + url = "https://github.com/deepmind/sonnet/commit/df5d099d4557a9a81a0eb969e5a81ed917bcd612.patch"; + hash = "sha256-s7abl83osD4wa0ZhqgDyjqQ3gagwGYCdQifwFqhNp34="; + }) + ]; + propagatedBuildInputs = [ dm-tree etils @@ -42,7 +51,9 @@ buildPythonPackage rec { }; nativeCheckInputs = [ + click docutils + tensorflow tensorflow-datasets ];