2015-09-23 23:45:45 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
|
2014-11-23 19:42:22 +00:00
|
|
|
|
2017-03-22 01:45:55 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2015-09-23 23:45:45 +00:00
|
|
|
name = "racer-${version}";
|
2017-07-27 21:55:26 +00:00
|
|
|
version = "2.0.9";
|
2017-03-22 01:45:55 +00:00
|
|
|
|
2015-09-23 23:45:45 +00:00
|
|
|
src = fetchFromGitHub {
|
2017-07-27 21:55:26 +00:00
|
|
|
owner = "racer-rust";
|
2015-09-23 23:45:45 +00:00
|
|
|
repo = "racer";
|
2017-03-22 01:45:55 +00:00
|
|
|
rev = version;
|
2017-07-27 21:55:26 +00:00
|
|
|
sha256 = "06k50f2vj2w08afh3nrlhs0amcvw2i45bhfwr70sgs395xicjswp";
|
2014-11-23 19:42:22 +00:00
|
|
|
};
|
|
|
|
|
2017-07-27 21:55:26 +00:00
|
|
|
depsSha256 = "1gywnjbjl9jalbq6wkfmbczav4qbhgw2h8lyxkyppnhw9y4j0nc1";
|
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 = ''
|
2017-07-27 21:55:26 +00:00
|
|
|
export RUST_SRC_PATH="${rustPlatform.rustcSrc}"
|
2015-01-20 18:24:49 +00:00
|
|
|
'';
|
2014-11-23 19:42:22 +00:00
|
|
|
|
2016-07-25 19:31:53 +00: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/
|
2017-07-18 15:15:00 +00:00
|
|
|
wrapProgram $out/bin/racer --set RUST_SRC_PATH "${rustPlatform.rustcSrc}"
|
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";
|
2017-07-27 21:55:26 +00:00
|
|
|
homepage = https://github.com/racer-rust/racer;
|
2017-03-22 01:45:55 +00:00
|
|
|
license = licenses.mit;
|
2015-09-23 23:45:45 +00:00
|
|
|
maintainers = with maintainers; [ jagajaga globin ];
|
2016-07-14 09:46:57 +00:00
|
|
|
platforms = platforms.all;
|
2014-11-23 19:42:22 +00:00
|
|
|
};
|
|
|
|
}
|