at 18.09-beta 1.7 kB view raw
1{ stdenv, callPackage, recurseIntoAttrs, makeRustPlatform, llvm, fetchurl 2, targets ? [] 3, targetToolchains ? [] 4, targetPatches ? [] 5}: 6 7let 8 rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {})); 9 version = "1.27.0"; 10 cargoVersion = "1.27.0"; 11 src = fetchurl { 12 url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; 13 sha256 = "089d7rhw55zpvnw71dj8vil6qrylvl4xjr4m8bywjj83d4zq1f9c"; 14 }; 15in rec { 16 rustc = callPackage ./rustc.nix { 17 inherit stdenv llvm targets targetPatches targetToolchains rustPlatform version src; 18 19 patches = [ 20 ./patches/net-tcp-disable-tests.patch 21 22 # Re-evaluate if this we need to disable this one 23 #./patches/stdsimd-disable-doctest.patch 24 25 # Fails on hydra - not locally; the exact reason is unknown. 26 # Comments in the test suggest that some non-reproducible environment 27 # variables such $RANDOM can make it fail. 28 ./patches/disable-test-inherit-env.patch 29 ]; 30 31 forceBundledLLVM = true; 32 33 configureFlags = [ "--release-channel=stable" ]; 34 35 # 1. Upstream is not running tests on aarch64: 36 # see https://github.com/rust-lang/rust/issues/49807#issuecomment-380860567 37 # So we do the same. 38 # 2. Tests run out of memory for i686 39 #doCheck = !stdenv.isAarch64 && !stdenv.isi686; 40 41 # Disabled for now; see https://github.com/NixOS/nixpkgs/pull/42348#issuecomment-402115598. 42 doCheck = false; 43 }; 44 45 cargo = callPackage ./cargo.nix rec { 46 version = cargoVersion; 47 inherit src; 48 inherit stdenv; 49 inherit rustc; # the rustc that will be wrapped by cargo 50 inherit rustPlatform; # used to build cargo 51 }; 52}