2015-09-24 00:45:45 +01:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
|
2014-11-23 19:42:22 +00:00
|
|
|
|
2014-10-10 15:59:37 +01:00
|
|
|
with rustPlatform;
|
|
|
|
|
|
|
|
buildRustPackage rec {
|
2015-09-24 00:45:45 +01:00
|
|
|
name = "racer-${version}";
|
2017-01-27 11:22:30 +00:00
|
|
|
version = "2.0.5";
|
2015-09-24 00:45:45 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phildawes";
|
|
|
|
repo = "racer";
|
2017-01-27 11:22:30 +00:00
|
|
|
rev = "93eac5cd633c937a05d4138559afe6fb054c7c28";
|
|
|
|
sha256 = "0smp5dv0f5bymficrg0dz8h9x4lhklrz6f31fbcy0vhg8l70di2n";
|
2014-11-23 19:42:22 +00:00
|
|
|
};
|
|
|
|
|
2017-01-27 11:22:30 +00:00
|
|
|
depsSha256 = "1qq2fpjg1wfb7z2s8p4i2aw9swcpqsp9m5jmhbyvwnd281ag4z6a";
|
2015-01-20 18:24:49 +00:00
|
|
|
|
2014-10-10 15:59:37 +01:00
|
|
|
buildInputs = [ makeWrapper ];
|
2015-01-20 18:24:49 +00:00
|
|
|
|
2015-04-21 19:34:26 +01:00
|
|
|
preCheck = ''
|
2016-07-25 20:31:53 +01:00
|
|
|
export RUST_SRC_PATH="${rustPlatform.rust.rustc.src}/src"
|
2015-01-20 18:24:49 +00:00
|
|
|
'';
|
2014-11-23 19:42:22 +00:00
|
|
|
|
2016-07-25 20:31:53 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
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/
|
2016-06-14 11:49:48 +01:00
|
|
|
wrapProgram $out/bin/racer --set RUST_SRC_PATH "${rustPlatform.rust.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 09:54:58 +01: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-24 00:45:45 +01:00
|
|
|
maintainers = with maintainers; [ jagajaga globin ];
|
2016-07-14 10:46:57 +01:00
|
|
|
platforms = platforms.all;
|
2014-11-23 19:42:22 +00:00
|
|
|
};
|
|
|
|
}
|