at 17.09-beta 1.6 kB view raw
1{ stdenv, fetchurl, makeWrapper, cacert, zlib, curl }: 2 3let 4 platform = 5 if stdenv.system == "i686-linux" 6 then "i686-unknown-linux-gnu" 7 else if stdenv.system == "x86_64-linux" 8 then "x86_64-unknown-linux-gnu" 9 else if stdenv.system == "i686-darwin" 10 then "i686-apple-darwin" 11 else if stdenv.system == "x86_64-darwin" 12 then "x86_64-apple-darwin" 13 else throw "missing bootstrap url for platform ${stdenv.system}"; 14 15 # fetch hashes by patching print-hashes.sh to not use the "$DATE" variable 16 # then running `print-hashes.sh 1.16.0` 17 bootstrapHash = 18 if stdenv.system == "i686-linux" 19 then "b5859161ebb182d3b75fa14a5741e5de87b088146fb0ef4a30f3b2439c6179c5" 20 else if stdenv.system == "x86_64-linux" 21 then "48621912c242753ba37cad5145df375eeba41c81079df46f93ffb4896542e8fd" 22 else if stdenv.system == "i686-darwin" 23 then "26356b14164354725bd0351e8084f9b164abab134fb05cddb7758af35aad2065" 24 else if stdenv.system == "x86_64-darwin" 25 then "2d08259ee038d3a2c77a93f1a31fc59e7a1d6d1bbfcba3dba3c8213b2e5d1926" 26 else throw "missing bootstrap hash for platform ${stdenv.system}"; 27 28 src = fetchurl { 29 url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz"; 30 sha256 = bootstrapHash; 31 }; 32 33 # Note: the version MUST be one version prior to the version we're 34 # building 35 version = "1.16.0"; 36in import ./binaryBuild.nix 37 { inherit stdenv fetchurl makeWrapper cacert zlib curl; 38 buildRustPackage = null; 39 inherit version src platform; 40 versionType = "bootstrap"; 41 }