1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 absl-py,
7 mujoco,
8 pyparsing,
9 pythonRelaxDepsHook,
10 setuptools,
11 wheel,
12 dm-env,
13 dm-tree,
14 fsspec,
15 glfw,
16 h5py,
17 lxml,
18 mock,
19 nose,
20 nose-xunitmp,
21 numpy,
22 pillow,
23 protobuf,
24 pyopengl,
25 requests,
26 scipy,
27 tqdm,
28 etils,
29}:
30
31buildPythonPackage rec {
32 pname = "dm-control";
33 version = "1.0.19";
34 pyproject = true;
35
36 disabled = pythonOlder "3.8";
37
38 src = fetchFromGitHub {
39 owner = "google-deepmind";
40 repo = "dm_control";
41 rev = "refs/tags/${version}";
42 hash = "sha256-q9hY/icvc1tPI0xBYxExc2a+gv0i6utaB4GBnJwQPCw=";
43 };
44
45 build-system = [
46 absl-py
47 mujoco
48 pyparsing
49 pythonRelaxDepsHook
50 setuptools
51 wheel
52 ];
53
54 pythonRemoveDeps = [
55 # Unpackaged
56 "labmaze"
57 ];
58
59 dependencies = [
60 absl-py
61 dm-env
62 dm-tree
63 fsspec
64 glfw
65 h5py
66 lxml
67 mock
68 mujoco
69 nose
70 nose-xunitmp
71 numpy
72 pillow
73 protobuf
74 pyopengl
75 pyparsing
76 requests
77 scipy
78 setuptools
79 tqdm
80 ] ++ etils.optional-dependencies.epath;
81
82 pythonImportsCheck = [ "dm_control" ];
83
84 # The installed library clashes with the `dm_control` directory remaining in the source path.
85 # Usually, we get around this by `rm -rf` the python source files to ensure that the installed package is used.
86 # Here, we cannot do that as it would also remove the tests which are also in the `dm_control` directory.
87 # See https://github.com/google-deepmind/dm_control/issues/6
88 doCheck = false;
89
90 meta = {
91 changelog = "https://github.com/google-deepmind/dm_control/releases/tag/${version}";
92 description = "Google DeepMind's software stack for physics-based simulation and Reinforcement Learning environments, using MuJoCo";
93 homepage = "https://github.com/google-deepmind/dm_control";
94 license = lib.licenses.asl20;
95 maintainers = with lib.maintainers; [ GaetanLepage ];
96 };
97}