2014-07-30 06:00:56 +02:00
|
|
|
{stdenv, version}:
|
|
|
|
|
|
|
|
{
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
platform = if stdenv.system == "i686-linux"
|
|
|
|
then "linux-i386"
|
|
|
|
else if stdenv.system == "x86_64-linux"
|
|
|
|
then "linux-x86_64"
|
2014-07-31 00:12:16 +02:00
|
|
|
else if stdenv.system == "i686-darwin"
|
|
|
|
then "macos-i386"
|
2014-07-30 06:00:56 +02:00
|
|
|
else if stdenv.system == "x86_64-darwin"
|
|
|
|
then "macos-x86_64"
|
2014-12-30 03:31:03 +01:00
|
|
|
else abort "no snapshot to bootstrap for this platform (missing platform url suffix)";
|
2014-07-30 06:00:56 +02:00
|
|
|
|
|
|
|
target = if stdenv.system == "i686-linux"
|
|
|
|
then "i686-unknown-linux-gnu"
|
|
|
|
else if stdenv.system == "x86_64-linux"
|
|
|
|
then "x86_64-unknown-linux-gnu"
|
2014-07-31 00:12:16 +02:00
|
|
|
else if stdenv.system == "i686-darwin"
|
|
|
|
then "i686-apple-darwin"
|
2014-07-30 06:00:56 +02:00
|
|
|
else if stdenv.system == "x86_64-darwin"
|
|
|
|
then "x86_64-apple-darwin"
|
2015-01-08 09:22:56 +01:00
|
|
|
else abort "no snapshot to bootstrap for this platform (missing target triple)";
|
2014-07-30 06:00:56 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.rust-lang.org/;
|
|
|
|
description = "A safe, concurrent, practical language";
|
2014-11-29 02:14:36 +01:00
|
|
|
maintainers = with maintainers; [ madjar cstrahan wizeman ];
|
2014-07-30 06:00:56 +02:00
|
|
|
license = map (builtins.getAttr "shortName") [ licenses.mit licenses.asl20 ];
|
2014-08-08 17:58:34 +02:00
|
|
|
platforms = platforms.linux;
|
2014-07-30 06:00:56 +02:00
|
|
|
};
|
|
|
|
|
2014-08-01 04:37:07 +02:00
|
|
|
name = "rustc-${version}";
|
2014-07-30 06:00:56 +02:00
|
|
|
}
|