about summary refs log tree commit diff
path: root/pkgs/development/python-modules/gym/default.nix
blob: fa8394411a951e7a59bae911b32cc1bee05e489d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  numpy,
  cloudpickle,
  gym-notices,
  importlib-metadata,
  pythonOlder,
}:

buildPythonPackage rec {
  pname = "gym";
  version = "0.26.2";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "openai";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-uJgm8l1SxIRC5PV6BIH/ht/1ucGT5UaUhkFMdusejgA=";
  };

  propagatedBuildInputs = [
    cloudpickle
    numpy
    gym-notices
  ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];

  # The test needs MuJoCo that is not free library.
  doCheck = false;

  pythonImportsCheck = [ "gym" ];

  meta = with lib; {
    description = "Toolkit for developing and comparing your reinforcement learning agents";
    homepage = "https://gym.openai.com/";
    license = licenses.mit;
    maintainers = with maintainers; [ hyphon81 ];
  };
}