2015-01-20 18:24:49 +00:00
|
|
|
{stdenv, fetchgit, rustc, cargo, makeWrapper }:
|
2014-11-23 19:42:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
#TODO add emacs support
|
2015-03-01 19:31:57 +00:00
|
|
|
name = "racer-git-2015-02-28";
|
2014-11-23 19:42:22 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = https://github.com/phildawes/racer;
|
2015-03-01 19:31:57 +00:00
|
|
|
rev = "2e1d718fae21431de4493c238196466e9d4996bc";
|
|
|
|
sha256 = "0lvp494kg2hlbbdrwxmmxkyhjw53y9wjdml9z817pwj3fwmrjsx0";
|
2014-11-23 19:42:22 +00:00
|
|
|
};
|
|
|
|
|
2015-01-20 18:24:49 +00:00
|
|
|
buildInputs = [ rustc cargo makeWrapper ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cargo build --release
|
|
|
|
'';
|
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
|
|
|
|
install "editors/"*.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-01-11 17:33: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;
|
2014-11-27 20:06:07 +00:00
|
|
|
maintainers = [ maintainers.jagajaga ];
|
2014-11-23 19:42:22 +00:00
|
|
|
};
|
|
|
|
}
|