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}";
|
|
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phildawes";
|
|
|
|
repo = "racer";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1b6829nqx0sqw1akcid61izw8mah1dfx2nxldkmmg4scnydhvw1l";
|
2014-11-23 19:42:22 +00:00
|
|
|
};
|
|
|
|
|
2015-09-23 23:45:45 +00:00
|
|
|
depsSha256 = "1hfqr1kidl77lq3djbhfn37whvv6k0hg9g5gcnl6pgl6kn669hdc";
|
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"
|
2015-01-24 02:12:22 +00:00
|
|
|
install -d $out/share/emacs/site-lisp
|
2015-09-23 23:45:45 +00:00
|
|
|
install "editors/emacs/"*.el $out/share/emacs/site-lisp
|
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
|
|
|
};
|
|
|
|
}
|