racer[d]: fix RUST_SRC_PATH

`rustc.src` is a `tar.gz` archive, but we need it unpacked.
This commit is contained in:
Benno Fünfstück 2017-07-18 17:15:00 +02:00
parent 476fc5f26e
commit 496dac571c
3 changed files with 10 additions and 2 deletions

View File

@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp -p target/release/racer $out/bin/ cp -p target/release/racer $out/bin/
wrapProgram $out/bin/racer --set RUST_SRC_PATH "${rustPlatform.rust.rustc.src}/src" wrapProgram $out/bin/racer --set RUST_SRC_PATH "${rustPlatform.rustcSrc}"
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -18,7 +18,7 @@ buildRustPackage rec {
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];
RUST_SRC_PATH = ''${rustPlatform.rust.rustc.src}/src''; RUST_SRC_PATH = rustPlatform.rustcSrc;
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View File

@ -5896,6 +5896,14 @@ with pkgs;
buildRustPackage = callPackage ../build-support/rust { buildRustPackage = callPackage ../build-support/rust {
inherit rust; inherit rust;
}; };
rustcSrc = stdenv.mkDerivation {
name = "rust-src";
src = rust.rustc.src;
phases = ["unpackPhase" "installPhase"];
installPhase = "mv src $out";
};
}); });
rainicorn = callPackage ../development/tools/rust/rainicorn { }; rainicorn = callPackage ../development/tools/rust/rainicorn { };