2023-03-30 22:05:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, setuptools
|
|
|
|
, numpy
|
|
|
|
, cloudpickle
|
|
|
|
, gym-notices
|
|
|
|
, jax-jumpy
|
|
|
|
, typing-extensions
|
|
|
|
, farama-notifications
|
|
|
|
, importlib-metadata
|
|
|
|
, pythonOlder
|
2023-10-09 19:29:22 +00:00
|
|
|
, ffmpeg
|
|
|
|
, jax
|
|
|
|
, jaxlib
|
|
|
|
, matplotlib
|
|
|
|
, moviepy
|
|
|
|
, opencv4
|
|
|
|
, pybox2d
|
|
|
|
, pygame
|
|
|
|
, pytestCheckHook
|
|
|
|
, scipy
|
2023-03-30 22:05:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gymnasium";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.29.1";
|
|
|
|
format = "pyproject";
|
2023-03-30 22:05:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Farama-Foundation";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "gymnasium";
|
2023-08-04 22:07:22 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-L7fn9FaJzXwQhjDKwI9hlFpbPuQdwynU+Xjd8bbjxiw=";
|
2023-03-30 22:05:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cloudpickle
|
2023-10-09 19:29:22 +00:00
|
|
|
farama-notifications
|
2023-03-30 22:05:00 +00:00
|
|
|
gym-notices
|
2023-10-09 19:29:22 +00:00
|
|
|
jax-jumpy
|
|
|
|
numpy
|
2023-03-30 22:05:00 +00:00
|
|
|
typing-extensions
|
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "gymnasium" ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
ffmpeg
|
|
|
|
jax
|
|
|
|
jaxlib
|
|
|
|
matplotlib
|
|
|
|
moviepy
|
|
|
|
opencv4
|
|
|
|
pybox2d
|
|
|
|
pygame
|
|
|
|
pytestCheckHook
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# mujoco is required for those tests but the mujoco python bindings are not packaged in nixpkgs.
|
|
|
|
"tests/envs/mujoco/test_mujoco_custom_env.py"
|
|
|
|
|
|
|
|
# Those tests need to write on the filesystem which cause them to fail.
|
|
|
|
"tests/experimental/wrappers/test_record_video.py"
|
|
|
|
"tests/utils/test_save_video.py"
|
|
|
|
"tests/wrappers/test_record_video.py"
|
|
|
|
"tests/wrappers/test_video_recorder.py"
|
|
|
|
];
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym)";
|
|
|
|
homepage = "https://github.com/Farama-Foundation/Gymnasium";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ GaetanLepage ];
|
|
|
|
};
|
|
|
|
}
|