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

33 lines
970 B
Nix
Raw Normal View History

{stdenv, fetchgit, rustPlatform, makeWrapper }:
2014-11-23 20:42:22 +01:00
with rustPlatform;
buildRustPackage rec {
2014-11-23 20:42:22 +01:00
#TODO add emacs support
2015-04-13 07:58:41 +02:00
name = "racer-git-2015-04-12";
2014-11-23 20:42:22 +01:00
src = fetchgit {
url = https://github.com/phildawes/racer;
2015-04-13 07:58:41 +02:00
rev = "5437e2074d87dfaab75a0f1bd2597bed61c0bbf1";
sha256 = "0a768gvjry86l0xa5q0122iyq7zn2h9adfniglsgrbs4fan49xyn";
2014-11-23 20:42:22 +01:00
};
depsSha256 = "0x1rq012k04ci18w5fll56jn011f1yyprs38pb3r223bag94ivsy";
buildInputs = [ makeWrapper ];
2014-11-23 20:42:22 +01: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 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; {
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
};
}