From fd152db8f792dd4818ba4746d15aa74b50be2df2 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Tue, 3 Jan 2017 16:50:56 +0100 Subject: rustNightlyBin: 2016-12-05 -> 2016-12-29 (#21618) - add cargo (hence the renaming) - also allow to built nix packages --- pkgs/development/compilers/rust/nightlyBin.nix | 36 +++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'pkgs/development/compilers/rust') 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" + ''} + ''; }; } -- cgit 1.4.1