3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/rust/default.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, callPackage, recurseIntoAttrs, makeRustPlatform, llvm, fetchurl
2017-03-24 23:59:14 +00:00
, 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";
2017-10-08 19:26:40 +01:00
srcSha = "1nz7sz7rzc6i1c0nzf6kmnmaq1l3hgrg19s589q7k309r6m7p7f7";
depsSha256 = "0pzfn1zjgklr0fw9zi9sxrwr08q3wcvdl9ybxrk3ld7ps5h9wmsi";
2016-08-08 14:55:26 +01:00
inherit rustc; # the rustc that will be wrapped by cargo
inherit rustPlatform; # used to build cargo
};
}