biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / dm-sonnet / default.nix
blob06b01a4478437e618e6d31f4aa5f895202fd5860
2   lib,
3   buildPythonPackage,
4   click,
5   dm-tree,
6   docutils,
7   etils,
8   fetchFromGitHub,
9   fetchpatch,
10   numpy,
11   pythonOlder,
12   tabulate,
13   tensorflow,
14   tensorflow-datasets,
15   wrapt,
18 buildPythonPackage rec {
19   pname = "dm-sonnet";
20   version = "2.0.2";
21   format = "setuptools";
23   disabled = pythonOlder "3.6";
25   src = fetchFromGitHub {
26     owner = "deepmind";
27     repo = "sonnet";
28     rev = "refs/tags/v${version}";
29     hash = "sha256-WkloUbqSyPG3cbLG8ktsjdluACkCbUZ7t6rYWst8rs8=";
30   };
32   patches = [
33     (fetchpatch {
34       name = "replace-np-bool-with-np-bool_.patch";
35       url = "https://github.com/deepmind/sonnet/commit/df5d099d4557a9a81a0eb969e5a81ed917bcd612.patch";
36       hash = "sha256-s7abl83osD4wa0ZhqgDyjqQ3gagwGYCdQifwFqhNp34=";
37     })
38   ];
40   propagatedBuildInputs = [
41     dm-tree
42     etils
43     numpy
44     tabulate
45     wrapt
46   ] ++ etils.optional-dependencies.epath;
48   optional-dependencies = {
49     tensorflow = [ tensorflow ];
50   };
52   nativeCheckInputs = [
53     click
54     docutils
55     tensorflow
56     tensorflow-datasets
57   ];
59   pythonImportsCheck = [ "sonnet" ];
61   meta = with lib; {
62     description = "Library for building neural networks in TensorFlow";
63     homepage = "https://github.com/deepmind/sonnet";
64     license = licenses.asl20;
65     maintainers = with maintainers; [ onny ];
66   };