diff --git a/pkgs/development/python-modules/farama-notifications/default.nix b/pkgs/development/python-modules/farama-notifications/default.nix new file mode 100644 index 000000000000..eb449b53c1c9 --- /dev/null +++ b/pkgs/development/python-modules/farama-notifications/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, setuptools +}: + +buildPythonPackage rec { + pname = "farama-notifications"; + version = "0.0.4"; + + src = fetchFromGitHub { + owner = "Farama-Foundation"; + repo = pname; + rev = version; + hash = "sha256-UUrJ/5t5x54xs1gweNUhwqrMJQXiyrUPn1bBfTsiPcw="; + }; + + format = "pyproject"; + + nativeBuildInputs = [ setuptools ]; + + pythonImportsCheck = [ "farama_notifications" ]; + + meta = with lib; { + description = "Allows for providing notifications on import to all Farama Packages"; + homepage = "https://github.com/Farama-Foundation/Farama-Notifications"; + license = licenses.mit; + maintainers = with maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/development/python-modules/gymnasium/default.nix b/pkgs/development/python-modules/gymnasium/default.nix new file mode 100644 index 000000000000..67f0ad094557 --- /dev/null +++ b/pkgs/development/python-modules/gymnasium/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, numpy +, cloudpickle +, gym-notices +, jax-jumpy +, typing-extensions +, farama-notifications +, importlib-metadata +, pythonOlder +}: + +buildPythonPackage rec { + pname = "gymnasium"; + version = "0.28.1"; + + src = fetchFromGitHub { + owner = "Farama-Foundation"; + repo = pname; + rev = "v${version}"; + hash = "sha256-7rRF21H3IxbgmqxvtC370kr0exLgfg3e2tA3J49xuao="; + }; + + format = "pyproject"; + + nativeBuildInputs = [ setuptools ]; + + propagatedBuildInputs = [ + jax-jumpy + cloudpickle + numpy + gym-notices + typing-extensions + farama-notifications + ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; + + pythonImportsCheck = [ "gymnasium" ]; + + meta = with lib; { + description = "A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym)"; + homepage = "https://github.com/Farama-Foundation/Gymnasium"; + license = licenses.mit; + maintainers = with maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/development/python-modules/jax-jumpy/default.nix b/pkgs/development/python-modules/jax-jumpy/default.nix new file mode 100644 index 000000000000..f37677da0283 --- /dev/null +++ b/pkgs/development/python-modules/jax-jumpy/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, setuptools +}: + +buildPythonPackage rec { + pname = "jumpy"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "Farama-Foundation"; + repo = pname; + rev = version; + hash = "sha256-tPQ/v2AVnAEC+08BVAvvgJ8Pj89nXZSn2tQ6nxXuSfA="; + }; + + format = "pyproject"; + + nativeBuildInputs = [ setuptools ]; + + propagatedBuildInputs = [ numpy ]; + + pythonImportsCheck = [ "jumpy" ]; + + meta = with lib; { + description = "Jumpy is a common backend for NumPy and optionally JAX"; + homepage = "https://github.com/Farama-Foundation/Jumpy"; + license = licenses.asl20; + maintainers = with maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 995a262756e0..ec01726d906a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3310,6 +3310,8 @@ self: super: with self; { faraday-plugins = callPackage ../development/python-modules/faraday-plugins { }; + farama-notifications = callPackage ../development/python-modules/farama-notifications { }; + fastai = callPackage ../development/python-modules/fastai { }; fastapi = callPackage ../development/python-modules/fastapi { }; @@ -4272,6 +4274,8 @@ self: super: with self; { gym-notices = callPackage ../development/python-modules/gym-notices { }; + gymnasium = callPackage ../development/python-modules/gymnasium { }; + gyp = callPackage ../development/python-modules/gyp { }; h11 = callPackage ../development/python-modules/h11 { }; @@ -4924,6 +4928,8 @@ self: super: with self; { jax = callPackage ../development/python-modules/jax { }; + jax-jumpy = callPackage ../development/python-modules/jax-jumpy { }; + jaxlib-bin = callPackage ../development/python-modules/jaxlib/bin.nix { cudaSupport = pkgs.config.cudaSupport or false; };