depot/third_party/nixpkgs/pkgs/development/python-modules/dm-control/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

97 lines
1.9 KiB
Nix

{
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.20";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "google-deepmind";
repo = "dm_control";
rev = "refs/tags/${version}";
hash = "sha256-huXvfQz7E+OCqRrhLC5dUaG/A2PQXrPBzseIFx7ZIeE=";
};
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 ];
};
}