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

38 lines
975 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-07-27 14:55:26 -07:00
version = "2.0.9";
2017-03-21 18:45:55 -07:00
2015-09-23 16:45:45 -07:00
src = fetchFromGitHub {
2017-07-27 14:55:26 -07:00
owner = "racer-rust";
2015-09-23 16:45:45 -07:00
repo = "racer";
2017-03-21 18:45:55 -07:00
rev = version;
2017-07-27 14:55:26 -07:00
sha256 = "06k50f2vj2w08afh3nrlhs0amcvw2i45bhfwr70sgs395xicjswp";
2014-11-23 11:42:22 -08:00
};
cargoSha256 = "1w5imxyqlyv24dvzncq6dy01zn2x8p1aciyvzh8ac1x1wdjcacjc";
buildInputs = [ makeWrapper ];
preCheck = ''
2017-07-27 14:55:26 -07:00
export RUST_SRC_PATH="${rustPlatform.rustcSrc}"
'';
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.rustcSrc}"
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";
2017-07-27 14:55:26 -07:00
homepage = https://github.com/racer-rust/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
};
}