mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
daf032e2ff
Kept 1.42 around for Thunderbird. i686-apple-darwin is no longer supported upstream. We could still support building it, for this one release, since we have the binary for the previous release, (or bootstrap it for future releases from Rust 1.42,) but since this release is the one that drops support, I think it makes sense to do it now. (And probably nobody is using it anyway.)
39 lines
857 B
Bash
Executable file
39 lines
857 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# All rust-related downloads can be found at
|
|
# https://static.rust-lang.org/dist/index.html. To find the date on
|
|
# which a particular thing was last updated, look for the *-date.txt
|
|
# file, e.g.
|
|
# https://static.rust-lang.org/dist/channel-rust-beta-date.txt
|
|
|
|
PLATFORMS=(
|
|
i686-unknown-linux-gnu
|
|
x86_64-unknown-linux-gnu
|
|
arm-unknown-linux-gnueabihf
|
|
armv7-unknown-linux-gnueabihf
|
|
aarch64-unknown-linux-gnu
|
|
x86_64-apple-darwin
|
|
)
|
|
BASEURL=https://static.rust-lang.org/dist
|
|
VERSION=${1:-}
|
|
DATE=${2:-}
|
|
|
|
if [[ -z $VERSION ]]
|
|
then
|
|
echo "No version supplied"
|
|
exit -1
|
|
fi
|
|
|
|
if [[ -n $DATE ]]
|
|
then
|
|
BASEURL=$BASEURL/$DATE
|
|
fi
|
|
|
|
for PLATFORM in "${PLATFORMS[@]}"
|
|
do
|
|
URL="$BASEURL/rust-$VERSION-$PLATFORM.tar.gz.sha256"
|
|
SHA256=$(curl -sSfL $URL | cut -d ' ' -f 1)
|
|
echo "$PLATFORM = \"$SHA256\";"
|
|
done
|