Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 numpy, 6 cloudpickle, 7 gym-notices, 8 importlib-metadata, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "gym"; 14 version = "0.26.2"; 15 format = "setuptools"; 16 17 src = fetchFromGitHub { 18 owner = "openai"; 19 repo = pname; 20 rev = "refs/tags/${version}"; 21 hash = "sha256-uJgm8l1SxIRC5PV6BIH/ht/1ucGT5UaUhkFMdusejgA="; 22 }; 23 24 propagatedBuildInputs = [ 25 cloudpickle 26 numpy 27 gym-notices 28 ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; 29 30 # The test needs MuJoCo that is not free library. 31 doCheck = false; 32 33 pythonImportsCheck = [ "gym" ]; 34 35 meta = with lib; { 36 description = "Toolkit for developing and comparing your reinforcement learning agents"; 37 homepage = "https://gym.openai.com/"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ hyphon81 ]; 40 }; 41}