Skip to content

Commit

Permalink
racer[d]: fix RUST_SRC_PATH
Browse files Browse the repository at this point in the history
`rustc.src` is a `tar.gz` archive, but we need it unpacked.
  • Loading branch information
bennofs committed Jul 18, 2017
1 parent 476fc5f commit 496dac5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkgs/development/tools/rust/racer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/tools/rust/racerd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit 496dac5

Please sign in to comment.