1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytest
5, gym
6, scipy
7, tqdm
8, joblib
9, dill
10, progressbar2
11, cloudpickle
12, click
13, pyzmq
14, tensorflow
15, mpi4py
16}:
17
18buildPythonPackage {
19 pname = "baselines";
20 version = "0.1.6"; # remember to manually adjust the rev
21
22 src = fetchFromGitHub {
23 owner = "openai";
24 repo = "baselines";
25 # Unfortunately releases are not tagged. This commit bumps the version in setup.py
26 rev = "2bca7901f51c88cdef3ca0666c6a87c454a4dbe8";
27 sha256 = "0j2ck7rsrcyny9qbmrw9aqvzfhv70nbign8iva2dsisa2x24gbcl";
28 };
29
30 propagatedBuildInputs = [
31 gym
32 scipy
33 tqdm
34 joblib
35 pyzmq
36 dill
37 progressbar2
38 mpi4py
39 cloudpickle
40 tensorflow
41 click
42 ];
43
44 postPatch = ''
45 # Needed for the atari wrapper, but the gym-atari package is not supported
46 # in nixos anyways. Since opencv-python is not currently packaged, we
47 # disable it.
48 sed -ie '/opencv-python/d' setup.py
49 '';
50
51 # fails to create a daemon, probably because of sandboxing
52 doCheck = false;
53
54 checkInputs = [
55 pytest
56 ];
57
58 meta = with lib; {
59 description = "High-quality implementations of reinforcement learning algorithms";
60 homepage = "https://github.com/openai/baselines";
61 license = licenses.mit;
62 maintainers = with maintainers; [ timokau ];
63 };
64}