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

39 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper , Security }:
rustPlatform.buildRustPackage rec {
2019-08-31 04:41:23 -07:00
pname = "racerd";
2019-10-03 02:15:30 -07:00
version = "unstable-2019-09-02";
2017-06-26 07:58:10 -07:00
src = fetchFromGitHub {
owner = "jwilm";
repo = "racerd";
2019-10-03 02:15:30 -07:00
rev = "e3d380b9a1d3f3b67286d60465746bc89fea9098";
sha256 = "13jqdvjk4savcl03mrn2vzgdsd7vxv2racqbyavrxp2cm9h6cjln";
};
cargoSha256 = "1nwjr7v8hkhsql93wbwk5gqqiq725gj5iwwsbd250my9g5kkfdbw";
2019-07-29 22:10:02 -07:00
# a nightly compiler is required unless we use this cheat code.
RUSTC_BOOTSTRAP=1;
doCheck = false;
2019-11-08 15:21:23 -08:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
RUST_SRC_PATH = rustPlatform.rustcSrc;
installPhase = ''
mkdir -p $out/bin
cp -p target/release/racerd $out/bin/
2019-07-29 22:10:02 -07: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;
};
}