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

38 lines
992 B
Nix
Raw Normal View History

2015-09-23 16:45:45 -07:00
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
2014-11-23 11:42:22 -08:00
2017-03-21 18:45:55 -07:00
rustPlatform.buildRustPackage rec {
2015-09-23 16:45:45 -07:00
name = "racer-${version}";
2017-03-21 18:45:55 -07:00
version = "2.0.6";
2015-09-23 16:45:45 -07:00
src = fetchFromGitHub {
owner = "phildawes";
repo = "racer";
2017-03-21 18:45:55 -07:00
rev = version;
sha256 = "09wgfrb0z2d2icfk11f1jal5p93sqjv3jzmzcgw0pgw3zvffhni3";
2014-11-23 11:42:22 -08:00
};
2017-03-21 18:45:55 -07:00
depsSha256 = "0mnq7dk9wz2k9jhzciknybwc471sy8f71cd15m752b5ng6v1f5kn";
buildInputs = [ makeWrapper ];
preCheck = ''
export RUST_SRC_PATH="${rustPlatform.rust.rustc.src}/src"
'';
2014-11-23 11:42:22 -08:00
doCheck = true;
2014-11-23 11:42:22 -08:00
installPhase = ''
mkdir -p $out/bin
cp -p target/release/racer $out/bin/
wrapProgram $out/bin/racer --set RUST_SRC_PATH "${rustPlatform.rust.rustc.src}/src"
2014-11-23 11:42:22 -08:00
'';
2014-11-27 12:06:07 -08:00
meta = with stdenv.lib; {
2015-04-28 01:54:58 -07:00
description = "A utility intended to provide Rust code completion for editors and IDEs";
2014-11-23 11:42:22 -08:00
homepage = https://github.com/phildawes/racer;
2017-03-21 18:45:55 -07:00
license = licenses.mit;
2015-09-23 16:45:45 -07:00
maintainers = with maintainers; [ jagajaga globin ];
2016-07-14 02:46:57 -07:00
platforms = platforms.all;
2014-11-23 11:42:22 -08:00
};
}