summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/cargo/print-hashes.sh
diff options
context:
space:
mode:
authorDavid Craven <david@craven.ch>2016-06-07 20:42:51 +0200
committerDavid Craven <david@craven.ch>2016-06-14 23:09:21 +0200
commit0720373dfc8ebb8962cdab9ba816c348fa7e6692 (patch)
treed92d8954919103d9a79bb9d97f48577b4ec1c7ae /pkgs/development/tools/build-managers/cargo/print-hashes.sh
parent06027595fcf802f2b8a8fc5bf29111d1ffac5c48 (diff)
downloadnixpkgs-0720373dfc8ebb8962cdab9ba816c348fa7e6692.tar
nixpkgs-0720373dfc8ebb8962cdab9ba816c348fa7e6692.tar.gz
nixpkgs-0720373dfc8ebb8962cdab9ba816c348fa7e6692.tar.bz2
nixpkgs-0720373dfc8ebb8962cdab9ba816c348fa7e6692.tar.lz
nixpkgs-0720373dfc8ebb8962cdab9ba816c348fa7e6692.tar.xz
nixpkgs-0720373dfc8ebb8962cdab9ba816c348fa7e6692.tar.zst
nixpkgs-0720373dfc8ebb8962cdab9ba816c348fa7e6692.zip
cargo: Use stable releases instead of snapshots
Diffstat (limited to 'pkgs/development/tools/build-managers/cargo/print-hashes.sh')
-rwxr-xr-xpkgs/development/tools/build-managers/cargo/print-hashes.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/tools/build-managers/cargo/print-hashes.sh b/pkgs/development/tools/build-managers/cargo/print-hashes.sh
new file mode 100755
index 00000000000..4d1d20066b8
--- /dev/null
+++ b/pkgs/development/tools/build-managers/cargo/print-hashes.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+PLATFORMS="i686-unknown-linux-gnu x86_64-unknown-linux-gnu i686-apple-darwin x86_64-apple-darwin"
+BASEURL="https://static.rust-lang.org/dist"
+VERSION=$1
+
+if [[ -z  $VERSION ]]
+then
+    echo "No version supplied"
+    exit -1
+fi
+
+for PLATFORM in $PLATFORMS
+do
+    URL="$BASEURL/rust-$VERSION-$PLATFORM.tar.gz.sha256"
+    curl $URL
+done