24 buildPythonPackage rec {
29 src = fetchFromGitHub {
30 owner = "Farama-Foundation";
32 rev = "refs/tags/v${version}";
33 hash = "sha256-/wIXjOGb3UeMQdeifYagd7OcxbBcdGPS09mjvkFsWmk=";
37 # Shimmy tries to register some environments from `dm-control` that require unpackaged `labmaze`.
38 # This prevents from importing `shimmy` itself by crashing with a `ModuleNotFoundError`.
39 # This patch imports those environments lazily.
41 # TODO: get rid of this patch at the next release as the issue has been fixed upstream:
42 # https://github.com/Farama-Foundation/Shimmy/pull/125
44 name = "prevent-labmaze-import-crash";
45 url = "https://github.com/Farama-Foundation/Shimmy/commit/095d576f6aae15a09a1e426138629ce9f43a3c04.patch";
46 hash = "sha256-rr9l3tHunYFk0j7hfo9IaSRlogAtwXoXcQ0zuU/TL8c=";
59 pythonImportsCheck = [ "shimmy" ];
72 # Requires unpackaged labmaze
73 "tests/test_dm_control_multi_agent.py"
75 # Requires unpackaged pyspiel
76 "tests/test_openspiel.py"
80 export HOME=$(mktemp -d)
84 # Require network access
85 "test_check_env[bsuite/mnist_noise-v0]"
86 "test_check_env[bsuite/mnist_scale-v0]"
87 "test_check_env[bsuite/mnist-v0]"
90 "test_pickle[bsuite/mnist-v0]"
91 "test_seeding[bsuite/mnist_noise-v0]"
92 "test_seeding[bsuite/mnist_scale-v0]"
93 "test_seeding[bsuite/mnist-v0]"
96 # RuntimeError: std::exception
98 "test_seeding[dm_control/quadruped-escape-v0]"
99 "test_rendering_camera_id"
100 "test_rendering_multiple_cameras"
101 "test_rendering_depth"
102 "test_render_height_widths"
106 changelog = "https://github.com/Farama-Foundation/Shimmy/releases/tag/v${version}";
107 description = "API conversion tool for popular external reinforcement learning environments";
108 homepage = "https://github.com/Farama-Foundation/Shimmy";
109 license = lib.licenses.mit;
110 maintainers = with lib.maintainers; [ GaetanLepage ];