2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-05-03 20:48:10 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, numpy
|
|
|
|
, cloudpickle
|
2022-11-02 22:02:43 +00:00
|
|
|
, gym-notices
|
|
|
|
, importlib-metadata
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gym";
|
2022-11-02 22:02:43 +00:00
|
|
|
version = "0.26.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openai";
|
|
|
|
repo = pname;
|
2022-11-02 22:02:43 +00:00
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "sha256-uJgm8l1SxIRC5PV6BIH/ht/1ucGT5UaUhkFMdusejgA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-05-03 20:48:10 +00:00
|
|
|
cloudpickle
|
|
|
|
numpy
|
2022-11-02 22:02:43 +00:00
|
|
|
gym-notices
|
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# The test needs MuJoCo that is not free library.
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
pythonImportsCheck = [ "gym" ];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-05-03 20:48:10 +00:00
|
|
|
description = "A toolkit for developing and comparing your reinforcement learning agents";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://gym.openai.com/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hyphon81 ];
|
|
|
|
};
|
|
|
|
}
|