depot/third_party/nixpkgs/pkgs/development/python-modules/equinox/default.nix

60 lines
1.1 KiB
Nix
Raw Normal View History

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
jax,
jaxlib,
jaxtyping,
typing-extensions,
# checks
beartype,
optax,
pytest-xdist,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "equinox";
version = "0.11.8";
pyproject = true;
src = fetchFromGitHub {
owner = "patrick-kidger";
repo = "equinox";
rev = "refs/tags/v${version}";
hash = "sha256-lZb2NobSELz8kviPd4Z8PPEEaydaEC5Z6eb9pzC7Ki8=";
};
build-system = [ hatchling ];
dependencies = [
jax
jaxlib
jaxtyping
typing-extensions
];
nativeCheckInputs = [
beartype
optax
pytest-xdist
pytestCheckHook
];
pythonImportsCheck = [ "equinox" ];
meta = {
description = "JAX library based around a simple idea: represent parameterised functions (such as neural networks) as PyTrees";
changelog = "https://github.com/patrick-kidger/equinox/releases/tag/v${version}";
homepage = "https://github.com/patrick-kidger/equinox";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}