27 buildPythonPackage rec {
32 src = fetchFromGitHub {
33 owner = "Farama-Foundation";
35 rev = "refs/tags/v${version}";
36 hash = "sha256-L7fn9FaJzXwQhjDKwI9hlFpbPuQdwynU+Xjd8bbjxiw=";
39 nativeBuildInputs = [ setuptools ];
41 propagatedBuildInputs = [
48 ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
50 pythonImportsCheck = [ "gymnasium" ];
65 # if `doCheck = true` on Darwin, `jaxlib` is evaluated, which is both
66 # marked as broken and throws an error during evaluation if the package is evaluated anyway.
67 # disabling checks on Darwin avoids this and allows the package to be built.
68 # if jaxlib is ever fixed on Darwin, remove this.
69 doCheck = !stdenv.hostPlatform.isDarwin;
72 # mujoco is required for those tests but the mujoco python bindings are not packaged in nixpkgs.
73 "tests/envs/mujoco/test_mujoco_custom_env.py"
75 # Those tests need to write on the filesystem which cause them to fail.
76 "tests/experimental/wrappers/test_record_video.py"
77 "tests/utils/test_save_video.py"
78 "tests/wrappers/test_record_video.py"
79 "tests/wrappers/test_video_recorder.py"
83 description = "Standard API for reinforcement learning and a diverse set of reference environments (formerly Gym)";
84 homepage = "https://github.com/Farama-Foundation/Gymnasium";
85 license = licenses.mit;
86 maintainers = with maintainers; [ GaetanLepage ];