depot/third_party/nixpkgs/pkgs/development/python-modules/jaxlib/prefetch.sh
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

18 lines
562 B
Bash
Executable file

#! /usr/bin/env nix-shell
#! nix-shell -i sh -p jq
prefetch () {
expr="(import <nixpkgs> { system = \"$2\"; config.cudaSupport = $3; }).python$1.pkgs.jaxlib-bin.src.url"
url=$(NIX_PATH=.. nix-instantiate --eval -E "$expr" | jq -r)
echo "$url"
sha256=$(nix-prefetch-url "$url")
nix hash to-sri --type sha256 "$sha256"
echo
}
for py in "39" "310" "311" "312"; do
prefetch "$py" "x86_64-linux" "false"
prefetch "$py" "aarch64-darwin" "false"
prefetch "$py" "x86_64-darwin" "false"
prefetch "$py" "x86_64-linux" "true"
done