38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ stdenv, callPackage, recurseIntoAttrs, makeRustPlatform, llvm, fetchurl
|
|
, targets ? []
|
|
, targetToolchains ? []
|
|
, targetPatches ? []
|
|
}:
|
|
|
|
let
|
|
rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {}));
|
|
version = "1.20.0";
|
|
in
|
|
rec {
|
|
rustc = callPackage ./rustc.nix {
|
|
inherit llvm targets targetPatches targetToolchains rustPlatform version;
|
|
|
|
forceBundledLLVM = true;
|
|
|
|
configureFlags = [ "--release-channel=stable" ];
|
|
|
|
src = fetchurl {
|
|
url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
|
|
sha256 = "0542y4rnzlsrricai130mqyxl8r6rd991frb4qsnwb27yigqg91a";
|
|
};
|
|
|
|
patches = [
|
|
./patches/darwin-disable-fragile-tcp-tests.patch
|
|
] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
|
|
|
|
};
|
|
|
|
cargo = callPackage ./cargo.nix rec {
|
|
version = "0.21.1";
|
|
srcSha = "1nz7sz7rzc6i1c0nzf6kmnmaq1l3hgrg19s589q7k309r6m7p7f7";
|
|
depsSha256 = "0pzfn1zjgklr0fw9zi9sxrwr08q3wcvdl9ybxrk3ld7ps5h9wmsi";
|
|
|
|
inherit rustc; # the rustc that will be wrapped by cargo
|
|
inherit rustPlatform; # used to build cargo
|
|
};
|
|
}
|