nixpkgs/pkgs/development/tools/rust/racer/default.nix

39 lines
1.0 KiB
Nix
Raw Normal View History

{stdenv, fetchgit, rustPlatform, makeWrapper }:
2014-11-23 19:42:22 +00:00
with rustPlatform;
buildRustPackage rec {
2014-11-23 19:42:22 +00:00
#TODO add emacs support
2015-05-12 15:24:52 +01:00
name = "racer-git-2015-05-04";
2014-11-23 19:42:22 +00:00
src = fetchgit {
url = https://github.com/phildawes/racer;
2015-05-12 15:24:52 +01:00
rev = "bf2373ec08b0be03598283bd610c5b61bdb8738c";
sha256 = "0ldf05d19ghxk3fslxrc87j18zg8bam2y0ygdy456h37y2p1d1ck";
2014-11-23 19:42:22 +00:00
};
2015-05-12 15:24:52 +01:00
patches = [ ./pr-232.patch ];
depsSha256 = "0rinyh365znx39aygxyyxmi496pw0alblf2dl7l8fbmz63nkhfv2";
buildInputs = [ makeWrapper ];
preCheck = ''
export RUST_SRC_PATH="${rustc.src}/src"
'';
2014-11-23 19:42:22 +00:00
installPhase = ''
mkdir -p $out/bin
cp -p target/release/racer $out/bin/
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-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;
2014-11-27 20:06:07 +00:00
maintainers = [ maintainers.jagajaga ];
2014-11-23 19:42:22 +00:00
};
}