2014-10-10 16:59:37 +02:00
|
|
|
{stdenv, fetchgit, rustPlatform, makeWrapper }:
|
2014-11-23 20:42:22 +01:00
|
|
|
|
2014-10-10 16:59:37 +02:00
|
|
|
with rustPlatform;
|
|
|
|
|
|
|
|
buildRustPackage rec {
|
2014-11-23 20:42:22 +01:00
|
|
|
#TODO add emacs support
|
2015-05-19 02:37:47 +02:00
|
|
|
name = "racer-git-2015-05-18";
|
2014-11-23 20:42:22 +01:00
|
|
|
src = fetchgit {
|
|
|
|
url = https://github.com/phildawes/racer;
|
2015-05-19 02:37:47 +02:00
|
|
|
rev = "c2d31ed49baa11f06ffc0c7bc8f95dd00037d035";
|
|
|
|
sha256 = "0g420cbqpknhl61a4mpk3bbia8agf657d9vzzcqr338lmni80qz7";
|
2014-11-23 20:42:22 +01:00
|
|
|
};
|
|
|
|
|
2015-05-19 18:21:11 +02:00
|
|
|
depsSha256 = "0s951apqcr96lvc1jamk6qw3631gwnlnfgcx55vlznfm7shnmywn";
|
2015-01-20 19:24:49 +01:00
|
|
|
|
2014-10-10 16:59:37 +02:00
|
|
|
buildInputs = [ makeWrapper ];
|
2015-01-20 19:24:49 +01:00
|
|
|
|
2015-04-21 20:34:26 +02:00
|
|
|
preCheck = ''
|
|
|
|
export RUST_SRC_PATH="${rustc.src}/src"
|
2015-01-20 19:24:49 +01:00
|
|
|
'';
|
2014-11-23 20:42:22 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2015-01-20 19:24:49 +01:00
|
|
|
cp -p target/release/racer $out/bin/
|
2015-01-11 18:33:58 +01:00
|
|
|
wrapProgram $out/bin/racer --set RUST_SRC_PATH "${rustc.src}/src"
|
2015-01-24 03:12:22 +01:00
|
|
|
install -d $out/share/emacs/site-lisp
|
|
|
|
install "editors/"*.el $out/share/emacs/site-lisp
|
2014-11-23 20:42:22 +01:00
|
|
|
'';
|
|
|
|
|
2014-11-27 21:06:07 +01:00
|
|
|
meta = with stdenv.lib; {
|
2015-04-28 10:54:58 +02:00
|
|
|
description = "A utility intended to provide Rust code completion for editors and IDEs";
|
2014-11-23 20:42:22 +01:00
|
|
|
homepage = https://github.com/phildawes/racer;
|
|
|
|
license = stdenv.lib.licenses.mit;
|
2014-11-27 21:06:07 +01:00
|
|
|
maintainers = [ maintainers.jagajaga ];
|
2014-11-23 20:42:22 +01:00
|
|
|
};
|
|
|
|
}
|