1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
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 {}));
2017-11-03 06:29:20 +00:00
version = "1.21.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";
2017-11-03 06:29:20 +00:00
sha256 = "1yj8lnxybjrybp00fqhxw8fpr641dh8wcn9mk44xjnsb4i1c21qp";
};
patches = [
./patches/0001-Disable-fragile-tests-libstd-net-tcp-on-Darwin-Linux.patch
] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
};
cargo = callPackage ./cargo.nix rec {
2017-10-19 23:29:28 +01:00
version = "0.22.0";
srcSha = "0x9pm73hkkd1hq4qrmz8iv91djgpdsxzwll7jari0h77vpwajmw4";
cargoSha256 = "0xd0rb8gcqy6xngsx9l30jg3fqrcwccgv904ksqs9c4d44hga0gd";
2016-08-08 14:55:26 +01:00
inherit rustc; # the rustc that will be wrapped by cargo
inherit rustPlatform; # used to build cargo
};
}