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

36 lines
929 B
Nix
Raw Normal View History

2015-09-23 23:45:45 +00:00
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
2014-11-23 19:42:22 +00:00
with rustPlatform;
buildRustPackage rec {
2015-09-23 23:45:45 +00:00
name = "racer-${version}";
2016-01-17 21:53:12 +00:00
version = "1.1.0";
2015-09-23 23:45:45 +00:00
src = fetchFromGitHub {
owner = "phildawes";
repo = "racer";
rev = "v${version}";
2016-01-17 21:53:12 +00:00
sha256 = "1y6xzavxm5bnqcnnz0mbnf2491m2kksp36yx3kd5mxyly33482y7";
2014-11-23 19:42:22 +00:00
};
2016-01-17 21:53:12 +00:00
depsSha256 = "1r2fxirkc0y6g7aas65n3yg1f2lf3kypnjr2v20p5np2lvla6djj";
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"
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
};
}