1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00

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 = ''
mkdir -p $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; {

View file

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

View file

@ -5896,6 +5896,14 @@ with pkgs;
buildRustPackage = callPackage ../build-support/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 { };