1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numpy
5, cloudpickle
6, gym-notices
7, importlib-metadata
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "gym";
13 version = "0.26.2";
14
15 src = fetchFromGitHub {
16 owner = "openai";
17 repo = pname;
18 rev = "refs/tags/${version}";
19 hash = "sha256-uJgm8l1SxIRC5PV6BIH/ht/1ucGT5UaUhkFMdusejgA=";
20 };
21
22 propagatedBuildInputs = [
23 cloudpickle
24 numpy
25 gym-notices
26 ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
27
28 # The test needs MuJoCo that is not free library.
29 doCheck = false;
30
31 pythonImportsCheck = [ "gym" ];
32
33 meta = with lib; {
34 description = "A toolkit for developing and comparing your reinforcement learning agents";
35 homepage = "https://gym.openai.com/";
36 license = licenses.mit;
37 maintainers = with maintainers; [ hyphon81 ];
38 };
39}