1{ lib
2, absl-py
3, buildPythonPackage
4, dm-tree
5, docutils
6, etils
7, fetchFromGitHub
8, numpy
9, pythonOlder
10, tabulate
11, tensorflow
12, tensorflow-datasets
13, wrapt
14}:
15
16buildPythonPackage rec {
17 pname = "dm-sonnet";
18 version = "2.0.0";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.6";
22
23 src = fetchFromGitHub {
24 owner = "deepmind";
25 repo = "sonnet";
26 rev = "v${version}";
27 hash = "sha256-YSMeH5ZTfP1OdLBepsxXAVczBG/ghSjCWjoz/I+TFl8=";
28 };
29
30 propagatedBuildInputs = [
31 dm-tree
32 etils
33 numpy
34 tabulate
35 wrapt
36 ] ++ etils.optional-dependencies.epath;
37
38 passthru.optional-dependencies = {
39 tensorflow = [
40 tensorflow
41 ];
42 };
43
44 checkInputs = [
45 docutils
46 tensorflow-datasets
47 ];
48
49 pythonImportsCheck = [
50 "sonnet"
51 ];
52
53 meta = with lib; {
54 description = "Library for building neural networks in TensorFlow";
55 homepage = "https://github.com/deepmind/sonnet";
56 license = licenses.asl20;
57 maintainers = with maintainers; [ onny ];
58 };
59}