3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/rust/racerd/default.nix

39 lines
1,019 B
Nix
Raw Normal View History

2017-06-26 15:58:10 +01:00
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
with rustPlatform;
buildRustPackage rec {
name = "racerd-${version}";
2019-07-30 06:10:02 +01:00
version = "2019-03-20";
2017-06-26 15:58:10 +01:00
src = fetchFromGitHub {
owner = "jwilm";
repo = "racerd";
2019-07-30 06:10:02 +01:00
rev = "6f74488e58e42314a36ff000bae796fe54c1bdd1";
sha256 = "1lg7j2plxpn5l65jxhsm99vmy08ljdb666hm0y1nnmmzalrakrg1";
};
2019-07-30 06:10:02 +01:00
# a nightly compiler is required unless we use this cheat code.
RUSTC_BOOTSTRAP=1;
doCheck = false;
2019-07-30 06:10:02 +01:00
cargoSha256 = "15894qr0kpp5kivx0p71zmmfhfh8in0ydkvfirxh2r12x0r2jhdd";
buildInputs = [ makeWrapper ];
RUST_SRC_PATH = rustPlatform.rustcSrc;
installPhase = ''
mkdir -p $out/bin
cp -p target/release/racerd $out/bin/
2019-07-30 06:10:02 +01:00
wrapProgram $out/bin/racerd --set-default RUST_SRC_PATH "$RUST_SRC_PATH"
'';
meta = with stdenv.lib; {
description = "JSON/HTTP Server based on racer for adding Rust support to editors and IDEs";
homepage = https://github.com/jwilm/racerd;
license = licenses.asl20;
platforms = platforms.all;
};
}