2015-09-24 01:45:45 +02:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
|
2014-11-23 20:42:22 +01:00
|
|
|
|
2014-10-10 16:59:37 +02:00
|
|
|
with rustPlatform;
|
|
|
|
|
|
|
|
buildRustPackage rec {
|
2015-09-24 01:45:45 +02:00
|
|
|
name = "racer-${version}";
|
2016-05-28 15:18:32 +02:00
|
|
|
version = "1.2.10";
|
2015-09-24 01:45:45 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phildawes";
|
|
|
|
repo = "racer";
|
2016-05-28 15:18:32 +02:00
|
|
|
rev = "e5ffe9efc1d10d4a7d66944b4c0939b7c575530e";
|
|
|
|
sha256 = "1cvgd6gcwb82p387h4wl8wz07z64is8jrihmf2z84vxmlrasmprm";
|
2014-11-23 20:42:22 +01:00
|
|
|
};
|
|
|
|
|
2016-05-28 15:18:32 +02:00
|
|
|
depsSha256 = "1d44q7hfxijn40q7y6xawgd3c91i90fmd1dyx7i2v9as29js5694";
|
2015-01-20 19:24:49 +01:00
|
|
|
|
2014-10-10 16:59:37 +02:00
|
|
|
buildInputs = [ makeWrapper ];
|
2015-01-20 19:24:49 +01:00
|
|
|
|
2015-04-21 20:34:26 +02:00
|
|
|
preCheck = ''
|
2016-06-14 12:49:48 +02:00
|
|
|
export RUST_SRC;_PATH="${rustPlatform.rust.rustc.src}/src"
|
2015-01-20 19:24:49 +01:00
|
|
|
'';
|
2014-11-23 20:42:22 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2015-01-20 19:24:49 +01:00
|
|
|
cp -p target/release/racer $out/bin/
|
2016-06-14 12:49:48 +02:00
|
|
|
wrapProgram $out/bin/racer --set RUST_SRC_PATH "${rustPlatform.rust.rustc.src}/src"
|
2014-11-23 20:42:22 +01:00
|
|
|
'';
|
|
|
|
|
2014-11-27 21:06:07 +01:00
|
|
|
meta = with stdenv.lib; {
|
2015-04-28 10:54:58 +02:00
|
|
|
description = "A utility intended to provide Rust code completion for editors and IDEs";
|
2014-11-23 20:42:22 +01:00
|
|
|
homepage = https://github.com/phildawes/racer;
|
|
|
|
license = stdenv.lib.licenses.mit;
|
2015-09-24 01:45:45 +02:00
|
|
|
maintainers = with maintainers; [ jagajaga globin ];
|
2014-11-23 20:42:22 +01:00
|
|
|
};
|
|
|
|
}
|