Commit 981dbd7f authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python312Packages.flaxlib: add update script

parent 4d530aeb
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -31,6 +31,9 @@

  # optional-dependencies
  matplotlib,

  writeScript,
  tomlq,
}:

buildPythonPackage rec {
@@ -112,6 +115,14 @@ buildPythonPackage rec {
    "test_vmap_and_cond_passthrough_error" # AssertionError: "at vmap.*'broadcast'.*got axis spec ...
  ];

  passthru = {
    updateScript = writeScript "update.sh" ''
      nix-update flax # does not --build by default
      nix-build . -A flax.src # src is essentially a passthru
      nix-update flaxlib --version="$(${lib.getExe tomlq} <result/Cargo.toml .something.version)" --commit
    '';
  };

  meta = {
    description = "Neural network library for JAX";
    homepage = "https://github.com/google/flax";
+4 −0
Original line number Diff line number Diff line
@@ -52,6 +52,10 @@ buildPythonPackage rec {
  # This package does not have tests (yet ?)
  doCheck = false;

  passthru = {
    inherit (flax) updateScript;
  };

  meta = {
    description = "Rust library used internally by flax";
    homepage = "https://github.com/google/flax/tree/main/flaxlib";