2018-11-11 04:09:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage, fetchPypi
|
2019-10-27 01:14:36 +01:00
|
|
|
, numpy, requests, six, pyglet, scipy, cloudpickle
|
2018-11-11 04:09:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gym";
|
2020-06-06 07:47:12 +01:00
|
|
|
version = "0.17.2";
|
2018-11-11 04:09:19 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-06 07:47:12 +01:00
|
|
|
sha256 = "bb495aa56995b01274a2213423bf5ba05b8f4fd51c6dc61e9d4abddd1189718e";
|
2018-11-11 04:09:19 +00:00
|
|
|
};
|
|
|
|
|
2019-10-27 01:14:36 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2020-09-23 21:37:37 +01:00
|
|
|
--replace "pyglet>=1.2.0,<=1.3.2" "pyglet" \
|
|
|
|
--replace "cloudpickle>=1.2.0,<1.4.0" "cloudpickle~=1.2"
|
2019-10-27 01:14:36 +01:00
|
|
|
'';
|
2020-09-23 21:37:37 +01:00
|
|
|
# cloudpickle range has been expanded in package but not yet released
|
2019-10-27 01:14:36 +01:00
|
|
|
|
2018-11-11 04:09:19 +00:00
|
|
|
propagatedBuildInputs = [
|
2019-10-27 01:14:36 +01:00
|
|
|
numpy requests six pyglet scipy cloudpickle
|
2018-11-11 04:09:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# The test needs MuJoCo that is not free library.
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-09-23 21:37:37 +01:00
|
|
|
pythonImportCheck = [ "gym" ];
|
|
|
|
|
2018-11-11 04:09:19 +00:00
|
|
|
meta = with lib; {
|
2018-12-15 01:02:15 +00:00
|
|
|
description = "A toolkit by OpenAI for developing and comparing your reinforcement learning agents";
|
2020-03-03 03:24:58 +00:00
|
|
|
homepage = "https://gym.openai.com/";
|
2018-11-11 04:09:19 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hyphon81 ];
|
|
|
|
};
|
|
|
|
}
|