Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.2 kB · 68 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869{ lib, buildPythonPackage, fetchFromGitHub,
# build-system flit-core,
# dependencies absl-py, chex, jax, jaxlib, numpy,
# tests callPackage,}:
buildPythonPackage rec { pname = "optax"; version = "0.2.5"; pyproject = true;
src = fetchFromGitHub { owner = "deepmind"; repo = "optax"; tag = "v${version}"; hash = "sha256-EGQeRYSxHdENqB3QPZFsjqwh4LYT5CF8E1K3fKFedPg="; };
outputs = [ "out" "testsout" ];
build-system = [ flit-core ];
dependencies = [ absl-py chex jax jaxlib numpy ];
postInstall = '' mkdir $testsout cp -R examples $testsout/examples '';
pythonImportsCheck = [ "optax" ];
# check in passthru.tests.pytest to escape infinite recursion with flax doCheck = false;
passthru.tests = { pytest = callPackage ./tests.nix { }; };
meta = { description = "Gradient processing and optimization library for JAX"; homepage = "https://github.com/deepmind/optax"; changelog = "https://github.com/deepmind/optax/releases/tag/v${version}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ ndl ]; };}