1{ lib
2, buildPythonPackage, fetchPypi
3, numpy, requests, six, pyglet, scipy, cloudpickle
4}:
5
6buildPythonPackage rec {
7 pname = "gym";
8 version = "0.17.2";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "bb495aa56995b01274a2213423bf5ba05b8f4fd51c6dc61e9d4abddd1189718e";
13 };
14
15 postPatch = ''
16 substituteInPlace setup.py \
17 --replace "pyglet>=1.2.0,<=1.3.2" "pyglet"
18 '';
19
20 propagatedBuildInputs = [
21 numpy requests six pyglet scipy cloudpickle
22 ];
23
24 # The test needs MuJoCo that is not free library.
25 doCheck = false;
26
27 meta = with lib; {
28 description = "A toolkit by OpenAI for developing and comparing your reinforcement learning agents";
29 homepage = "https://gym.openai.com/";
30 license = licenses.mit;
31 maintainers = with maintainers; [ hyphon81 ];
32 };
33}