1{ stdenv, callPackage, recurseIntoAttrs, makeRustPlatform, llvm, fetchurl
2, CoreFoundation, Security
3, targets ? []
4, targetToolchains ? []
5, targetPatches ? []
6}:
7
8let
9 rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}));
10 version = "1.32.0";
11 cargoVersion = "1.32.0";
12 src = fetchurl {
13 url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
14 sha256 = "0ji2l9xv53y27xy72qagggvq47gayr5lcv2jwvmfirx029vlqnac";
15 };
16in rec {
17 rustc = callPackage ./rustc.nix {
18 inherit stdenv llvm targets targetPatches targetToolchains rustPlatform version src;
19
20 patches = [
21 ./patches/net-tcp-disable-tests.patch
22
23 # Re-evaluate if this we need to disable this one
24 #./patches/stdsimd-disable-doctest.patch
25 ];
26
27 withBundledLLVM = false;
28
29 configureFlags = [ "--release-channel=stable" ];
30
31 # 1. Upstream is not running tests on aarch64:
32 # see https://github.com/rust-lang/rust/issues/49807#issuecomment-380860567
33 # So we do the same.
34 # 2. Tests run out of memory for i686
35 #doCheck = !stdenv.isAarch64 && !stdenv.isi686;
36
37 # Disabled for now; see https://github.com/NixOS/nixpkgs/pull/42348#issuecomment-402115598.
38 doCheck = false;
39 };
40
41 cargo = callPackage ./cargo.nix rec {
42 version = cargoVersion;
43 inherit src stdenv CoreFoundation Security;
44 inherit rustc; # the rustc that will be wrapped by cargo
45 inherit rustPlatform; # used to build cargo
46 };
47}