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