depot/third_party/nixpkgs/pkgs/development/python-modules/optimistix/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

63 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
equinox,
jax,
jaxtyping,
lineax,
typing-extensions,
# checks
beartype,
jaxlib,
optax,
pytestCheckHook,
pytest-xdist,
}:
buildPythonPackage rec {
pname = "optimistix";
version = "0.0.8";
pyproject = true;
src = fetchFromGitHub {
owner = "patrick-kidger";
repo = "optimistix";
rev = "refs/tags/v${version}";
hash = "sha256-0ehNApiBoiAb8LFBW81ZCRPsjTVQG8zRTVSAp7oHF8w=";
};
build-system = [ hatchling ];
dependencies = [
equinox
jax
jaxtyping
lineax
typing-extensions
];
pythonImportsCheck = [ "optimistix" ];
nativeCheckInputs = [
beartype
jaxlib
optax
pytestCheckHook
pytest-xdist
];
meta = {
description = "Nonlinear optimisation (root-finding, least squares, ...) in JAX+Equinox";
homepage = "https://github.com/patrick-kidger/optimistix";
changelog = "https://github.com/patrick-kidger/optimistix/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}