anchor.diff:  # https://storage.googleapis.com/jax-releases/libtpu_releases.html.
   
   # For future reference, the easiest way to test the GPU backend is to run
  -#   NIX_PATH=.. nix-shell -p python3 python3Packages.jax "python3Packages.jaxlib.override { cudaSupport = true; }"
  +#   NIX_PATH=.. nix-shell -p python3 python3Packages.jax "python3Packages.jaxlib-bin.override { cudaSupport = true; }"
   #   export XLA_FLAGS=--xla_gpu_force_compilation_parallelism=1
   #   python -c "from jax.lib import xla_bridge; assert xla_bridge.get_backend().platform == 'gpu'"
   #   python -c "from jax import random; random.PRNGKey(0)"
  
positive.code:     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
      license = licenses.asl20;
      maintainers = with maintainers; [ samuela ];
      platforms = [ "x86_64-linux" ];
    };
  }
  
negative.code:   inherit (cudaPackages) cudatoolkit cudnn;
  in
  
  assert cudaSupport -> lib.versionAtLeast cudatoolkit.version "11.1";
  assert cudaSupport -> lib.versionAtLeast cudnn.version "8.2";
  
  let
    version = "0.3.22";
  
    pythonVersion = python.pythonVersion;
  
    # Find new releases at https://storage.googleapis.com/jax-releases/jax_releases.html.
    # When upgrading, you can get these hashes from prefetch.sh. See
    # https://github.com/google/jax/issues/12879 as to why this specific URL is
    # the correct index.
    cpuSrcs = {
      "x86_64-linux" = fetchurl {
        url = "https://storage.googleapis.com/jax-releases/nocuda/jaxlib-${version}-cp310-cp310-manylinux2014_x86_64.whl";
        hash = "sha256-w2wo0jk+1BdEkNwfSZRQbebdI4Ac8Kgn0MB0cIMcWU4=";
      };
      "aarch64-darwin" = fetchurl {
        url = "https://storage.googleapis.com/jax-releases/mac/jaxlib-${version}-cp310-cp310-macosx_11_0_arm64.whl";
        hash = "sha256-7Ir55ZhBkccqfoa56WVBF8QwFAC2ws4KFHDkfVw6zm0=";
      };
    };
  
    gpuSrc = fetchurl {
      url = "https://storage.googleapis.com/jax-releases/cuda11/jaxlib-${version}+cuda11.cudnn82-cp310-cp310-manylinux2014_x86_64.whl";
      hash = "sha256-rabU62p4fF7Tu/6t8LNYZdf6YO06jGry/JtyFZeamCs=";
    };
  in
  buildPythonPackage rec {
  