Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 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.37.0"; 7 8 # fetch hashes by running `print-hashes.sh 1.37.0` 9 hashes = { 10 i686-unknown-linux-gnu = "74510e0e52a55e65a9f716673c2cda4d2bd427e2453541c6993c77c3ec04acf9"; 11 x86_64-unknown-linux-gnu = "cb573229bfd32928177c3835fdeb62d52da64806b844bc1095c6225b0665a1cb"; 12 armv7-unknown-linux-gnueabihf = "5b87b877f0ed20c6a09ce26e7a15d8c61b26b62484b97e78a51099d0efefec98"; 13 aarch64-unknown-linux-gnu = "263ef98fa3a6b2911b56f89c06615cdebf6ef676eb9b2493ad1539602f79b6ba"; 14 i686-apple-darwin = "e45d0c4d882fc6c404ffa6fe790294f4ea96384a2b48804adbf723f3635477a8"; 15 x86_64-apple-darwin = "b2310c97ffb964f253c4088c8d29865f876a49da2a45305493af5b5c7a3ca73d"; 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 ./binary.nix 39 { inherit version src platform; 40 versionType = "bootstrap"; 41 }