1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/pkgs/development/python-modules/gym/default.nix
Bill Huang 06c9d4d95c
gym: 0.21.0 -> 0.26.2
add importlib-metadata as dependency when python < 3.10
2022-11-01 22:22:54 +08:00

40 lines
836 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, cloudpickle
, gym-notices
, importlib-metadata
, pythonOlder
}:
buildPythonPackage rec {
pname = "gym";
version = "0.26.2";
src = fetchFromGitHub {
owner = "openai";
repo = pname;
rev = "${version}";
sha256 = "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 = "A toolkit for developing and comparing your reinforcement learning agents";
homepage = "https://gym.openai.com/";
license = licenses.mit;
maintainers = with maintainers; [ hyphon81 ];
};
}