2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, rustPlatform, makeWrapper, Security }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "racerd";
|
|
|
|
version = "unstable-2019-09-02";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jwilm";
|
|
|
|
repo = "racerd";
|
|
|
|
rev = "e3d380b9a1d3f3b67286d60465746bc89fea9098";
|
|
|
|
sha256 = "13jqdvjk4savcl03mrn2vzgdsd7vxv2racqbyavrxp2cm9h6cjln";
|
|
|
|
};
|
|
|
|
|
|
|
|
cargoPatches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/jwilm/racerd/commit/856f3656e160cd2909c5166e962f422c901720ee.patch";
|
|
|
|
sha256 = "1qq2k4bnwjz5qgn7s8yxd090smwn2wvdm8dd1rrlgpln0a5vxkpb";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
cargoSha256 = "08zn65c5ivhn2qs02aiixyqwhywrw8kfvs0kgzxdzsipic47n2qq";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# a nightly compiler is required unless we use this cheat code.
|
|
|
|
RUSTC_BOOTSTRAP=1;
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
RUST_SRC_PATH = rustPlatform.rustcSrc;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2020-05-03 17:38:23 +00:00
|
|
|
cp -p $releaseDir/racerd $out/bin/
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapProgram $out/bin/racerd --set-default RUST_SRC_PATH "$RUST_SRC_PATH"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
broken = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "JSON/HTTP Server based on racer for adding Rust support to editors and IDEs";
|
|
|
|
homepage = "https://github.com/jwilm/racerd";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|