blob: 0f5caa40e738d2c2b96484d1a91da8f511b5e6f4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
with rustPlatform;
buildRustPackage rec {
name = "racer-${version}";
version = "1.1.0";
src = fetchFromGitHub {
owner = "phildawes";
repo = "racer";
rev = "v${version}";
sha256 = "1y6xzavxm5bnqcnnz0mbnf2491m2kksp36yx3kd5mxyly33482y7";
};
depsSha256 = "1r2fxirkc0y6g7aas65n3yg1f2lf3kypnjr2v20p5np2lvla6djj";
buildInputs = [ makeWrapper ];
preCheck = ''
export RUST_SRC_PATH="${rustc.src}/src"
'';
installPhase = ''
mkdir -p $out/bin
cp -p target/release/racer $out/bin/
wrapProgram $out/bin/racer --set RUST_SRC_PATH "${rustc.src}/src"
'';
meta = with stdenv.lib; {
description = "A utility intended to provide Rust code completion for editors and IDEs";
homepage = https://github.com/phildawes/racer;
license = stdenv.lib.licenses.mit;
maintainers = with maintainers; [ jagajaga globin ];
};
}
|