2017-11-15 15:48:54 +01:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper, rustup, substituteAll }:
|
2014-11-23 20:42:22 +01:00
|
|
|
|
2017-03-22 02:45:55 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2015-09-24 01:45:45 +02:00
|
|
|
name = "racer-${version}";
|
2017-11-15 15:48:54 +01:00
|
|
|
version = "2.0.12";
|
2017-03-22 02:45:55 +01:00
|
|
|
|
2015-09-24 01:45:45 +02:00
|
|
|
src = fetchFromGitHub {
|
2017-07-27 23:55:26 +02:00
|
|
|
owner = "racer-rust";
|
2015-09-24 01:45:45 +02:00
|
|
|
repo = "racer";
|
2017-03-22 02:45:55 +01:00
|
|
|
rev = version;
|
2017-11-15 15:48:54 +01:00
|
|
|
sha256 = "0y1xlpjr8y8gsmmrjlykx4vwzf8akk42g35kg3kc419ry4fli945";
|
2014-11-23 20:42:22 +01:00
|
|
|
};
|
|
|
|
|
2017-11-15 15:48:54 +01:00
|
|
|
cargoSha256 = "1h3jv4hajdv6k309kjr6b6298kxmd0faw081i3788sl794k9mp0j";
|
2015-01-20 19:24:49 +01:00
|
|
|
|
2017-11-15 15:48:54 +01:00
|
|
|
# rustup is required for test
|
|
|
|
buildInputs = [ makeWrapper rustup ];
|
2015-01-20 19:24:49 +01:00
|
|
|
|
2015-04-21 20:34:26 +02:00
|
|
|
preCheck = ''
|
2017-07-27 23:55:26 +02:00
|
|
|
export RUST_SRC_PATH="${rustPlatform.rustcSrc}"
|
2015-01-20 19:24:49 +01:00
|
|
|
'';
|
2017-11-15 15:48:54 +01:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./rust-src.patch;
|
|
|
|
inherit (rustPlatform) rustcSrc;
|
|
|
|
})
|
|
|
|
./ignore-tests.patch
|
|
|
|
];
|
2016-07-25 21:31:53 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
2014-11-27 21:06:07 +01:00
|
|
|
meta = with stdenv.lib; {
|
2015-04-28 10:54:58 +02:00
|
|
|
description = "A utility intended to provide Rust code completion for editors and IDEs";
|
2017-07-27 23:55:26 +02:00
|
|
|
homepage = https://github.com/racer-rust/racer;
|
2017-03-22 02:45:55 +01:00
|
|
|
license = licenses.mit;
|
2015-09-24 01:45:45 +02:00
|
|
|
maintainers = with maintainers; [ jagajaga globin ];
|
2016-07-14 11:46:57 +02:00
|
|
|
platforms = platforms.all;
|
2014-11-23 20:42:22 +01:00
|
|
|
};
|
|
|
|
}
|