3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/rust/common.nix
John Ericson 210452979a rust: Prepare for more versions part 1:
- Factor out some things that REALLY shouldn't change between versions
2014-07-30 07:39:06 +02:00

33 lines
1.1 KiB
Nix

{stdenv, version}:
{
inherit version;
platform = if stdenv.system == "i686-linux"
then "linux-i386"
else if stdenv.system == "x86_64-linux"
then "linux-x86_64"
else if stdenv.system == "x86_64-darwin"
then "macos-x86_64"
else abort "no snapshot to boostrap for this platform (missing platform url suffix)";
target = if stdenv.system == "i686-linux"
then "i686-unknown-linux-gnu"
else if stdenv.system == "x86_64-linux"
then "x86_64-unknown-linux-gnu"
else if stdenv.system == "x86_64-darwin"
then "x86_64-apple-darwin"
else abort "no snapshot to boostrap for this platform (missing target triple";
meta = with stdenv.lib; {
homepage = http://www.rust-lang.org/;
description = "A safe, concurrent, practical language";
maintainers = with maintainers; [ madjar cstrahan ];
license = map (builtins.getAttr "shortName") [ licenses.mit licenses.asl20 ];
# platforms as per http://static.rust-lang.org/doc/master/tutorial.html#getting-started
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
};
name = "rust-${version}";
}