Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 41 lines 1.7 kB view raw
1{ stdenv, fetchurl, callPackage }: 2 3let 4 # Note: the version MUST be one version prior to the version we're 5 # building 6 version = "1.31.1"; 7 8 # fetch hashes by running `print-hashes.sh 1.31.1` 9 hashes = { 10 i686-unknown-linux-gnu = "1e77e5e8c745320faad9ce6f319a77b4a2e75d972eb68a195acd081ad910ab6d"; 11 x86_64-unknown-linux-gnu = "a64685535d0c457f49a8712a096a5c21564cd66fd2f7da739487f028192ebe3c"; 12 armv7-unknown-linux-gnueabihf = "11c717b781a7af5bdc829894139f8f45d4c12a061f7f9e39481f21426a04eb21"; 13 aarch64-unknown-linux-gnu = "29a7c6eb536fefd0ca459e48dfaea006aa8bff8a87aa82a9b7d483487033632a"; 14 i686-apple-darwin = "46566dc25fcbd8badc9950b8c9f9b0faeca065b5a09cd96258e4f4b10d686aed"; 15 x86_64-apple-darwin = "8398b1b303bdf0e7605d08b87070a514a4f588797c6fb3593718cb9cec233ad6"; 16 }; 17 18 platform = 19 if stdenv.hostPlatform.system == "i686-linux" 20 then "i686-unknown-linux-gnu" 21 else if stdenv.hostPlatform.system == "x86_64-linux" 22 then "x86_64-unknown-linux-gnu" 23 else if stdenv.hostPlatform.system == "armv7l-linux" 24 then "armv7-unknown-linux-gnueabihf" 25 else if stdenv.hostPlatform.system == "aarch64-linux" 26 then "aarch64-unknown-linux-gnu" 27 else if stdenv.hostPlatform.system == "i686-darwin" 28 then "i686-apple-darwin" 29 else if stdenv.hostPlatform.system == "x86_64-darwin" 30 then "x86_64-apple-darwin" 31 else throw "missing bootstrap url for platform ${stdenv.hostPlatform.system}"; 32 33 src = fetchurl { 34 url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz"; 35 sha256 = hashes."${platform}"; 36 }; 37 38in callPackage ./binaryBuild.nix 39 { inherit version src platform; 40 versionType = "bootstrap"; 41 }