diff options
author | Jörg Thalheim <joerg@higgsboson.tk> | 2017-01-03 16:50:56 +0100 |
---|---|---|
committer | Joachim Schiele <js@lastlog.de> | 2017-01-03 16:50:56 +0100 |
commit | fd152db8f792dd4818ba4746d15aa74b50be2df2 (patch) | |
tree | e417a7188181bd71eda31fb2acbc97b7a5aafe4d /pkgs/development/compilers/rust | |
parent | 82b0ae1223af12fdc1e38e0290b2577c47aa1a66 (diff) | |
download | nixlib-fd152db8f792dd4818ba4746d15aa74b50be2df2.tar nixlib-fd152db8f792dd4818ba4746d15aa74b50be2df2.tar.gz nixlib-fd152db8f792dd4818ba4746d15aa74b50be2df2.tar.bz2 nixlib-fd152db8f792dd4818ba4746d15aa74b50be2df2.tar.lz nixlib-fd152db8f792dd4818ba4746d15aa74b50be2df2.tar.xz nixlib-fd152db8f792dd4818ba4746d15aa74b50be2df2.tar.zst nixlib-fd152db8f792dd4818ba4746d15aa74b50be2df2.zip |
rustNightlyBin: 2016-12-05 -> 2016-12-29 (#21618)
- add cargo (hence the renaming) - also allow to built nix packages
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r-- | pkgs/development/compilers/rust/nightlyBin.nix | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/pkgs/development/compilers/rust/nightlyBin.nix b/pkgs/development/compilers/rust/nightlyBin.nix index a60d17fb7cbe..0671a88d2c4d 100644 --- a/pkgs/development/compilers/rust/nightlyBin.nix +++ b/pkgs/development/compilers/rust/nightlyBin.nix @@ -1,9 +1,9 @@ -{ stdenv, fetchurl, makeWrapper, cacert, zlib }: +{ stdenv, fetchurl, makeWrapper, cacert, zlib, buildRustPackage }: let inherit (stdenv.lib) optionalString; - platform = if stdenv.system == "x86_64-linux" + platform = if stdenv.system == "x86_64-linux" then "x86_64-unknown-linux-gnu" else abort "missing boostrap url for platform ${stdenv.system}"; @@ -19,10 +19,12 @@ let sha256 = bootstrapHash; }; - version = "2016-12-05"; + version = "2016-12-29"; in rec { + inherit buildRustPackage; + rustc = stdenv.mkDerivation rec { name = "rustc-nightly-${version}"; @@ -49,5 +51,33 @@ rec { "$out/bin/rustc" ''} ''; + + }; + cargo = stdenv.mkDerivation rec { + name = "cargo-nightly-${version}"; + + inherit version; + inherit src; + + meta = with stdenv.lib; { + homepage = http://www.rust-lang.org/; + description = "A safe, concurrent, practical language"; + maintainers = with maintainers; [ qknight ]; + license = [ licenses.mit licenses.asl20 ]; + }; + + buildInputs = [ makeWrapper ]; + phases = ["unpackPhase" "installPhase"]; + + installPhase = '' + ./install.sh --prefix=$out \ + --components=cargo + + ${optionalString needsPatchelf '' + patchelf \ + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + "$out/bin/cargo" + ''} + ''; }; } |