about summary refs log tree commit diff
path: root/pkgs/development/python-modules/dm-control/default.nix
blob: 6418163b6bc743f5926701e09c7e4d25056a2b3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, absl-py
, mujoco
, pyparsing
, pythonRelaxDepsHook
, setuptools
, wheel
, dm-env
, dm-tree
, fsspec
, glfw
, h5py
, lxml
, mock
, nose
, nose-xunitmp
, numpy
, pillow
, protobuf
, pyopengl
, requests
, scipy
, tqdm
, etils
}:

buildPythonPackage rec {
  pname = "dm-control";
  version = "1.0.19";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "google-deepmind";
    repo = "dm_control";
    rev = "refs/tags/${version}";
    hash = "sha256-q9hY/icvc1tPI0xBYxExc2a+gv0i6utaB4GBnJwQPCw=";
  };

  build-system = [
    absl-py
    mujoco
    pyparsing
    pythonRelaxDepsHook
    setuptools
    wheel
  ];

  pythonRemoveDeps = [
    # Unpackaged
    "labmaze"
  ];

  dependencies = [
    absl-py
    dm-env
    dm-tree
    fsspec
    glfw
    h5py
    lxml
    mock
    mujoco
    nose
    nose-xunitmp
    numpy
    pillow
    protobuf
    pyopengl
    pyparsing
    requests
    scipy
    setuptools
    tqdm
  ] ++ etils.optional-dependencies.epath;

  pythonImportsCheck = [
    "dm_control"
  ];

  # The installed library clashes with the `dm_control` directory remaining in the source path.
  # Usually, we get around this by `rm -rf` the python source files to ensure that the installed package is used.
  # Here, we cannot do that as it would also remove the tests which are also in the `dm_control` directory.
  # See https://github.com/google-deepmind/dm_control/issues/6
  doCheck = false;

  meta = {
    changelog = "https://github.com/google-deepmind/dm_control/releases/tag/${version}";
    description = "Google DeepMind's software stack for physics-based simulation and Reinforcement Learning environments, using MuJoCo";
    homepage = "https://github.com/google-deepmind/dm_control";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}