2020-03-14 00:38:30 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, rustPlatform, makeWrapper, Security }:
|
2016-03-20 07:29:47 +00:00
|
|
|
|
2020-03-09 03:32:15 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "racerd";
|
2019-10-03 10:15:30 +01:00
|
|
|
version = "unstable-2019-09-02";
|
2020-03-09 03:32:15 +00:00
|
|
|
|
2017-06-26 15:58:10 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jwilm";
|
|
|
|
repo = "racerd";
|
2019-10-03 10:15:30 +01:00
|
|
|
rev = "e3d380b9a1d3f3b67286d60465746bc89fea9098";
|
|
|
|
sha256 = "13jqdvjk4savcl03mrn2vzgdsd7vxv2racqbyavrxp2cm9h6cjln";
|
2016-03-20 07:29:47 +00:00
|
|
|
};
|
|
|
|
|
2020-03-14 00:38:30 +00:00
|
|
|
cargoPatches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/jwilm/racerd/commit/856f3656e160cd2909c5166e962f422c901720ee.patch";
|
|
|
|
sha256 = "1qq2k4bnwjz5qgn7s8yxd090smwn2wvdm8dd1rrlgpln0a5vxkpb";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
cargoSha256 = "1z0dh2j9ik66i6nww3z7z2gw7nhc0b061zxbjzamk1jybpc845lq";
|
2020-03-09 03:32:15 +00:00
|
|
|
|
2019-07-30 06:10:02 +01:00
|
|
|
# a nightly compiler is required unless we use this cheat code.
|
|
|
|
RUSTC_BOOTSTRAP=1;
|
|
|
|
|
2016-03-20 07:29:47 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2019-11-08 23:21:23 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
2016-03-20 07:29:47 +00:00
|
|
|
|
2017-07-18 16:15:00 +01:00
|
|
|
RUST_SRC_PATH = rustPlatform.rustcSrc;
|
2016-03-20 07:29:47 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2020-03-20 06:46:15 +00:00
|
|
|
cp -p $releaseDir/racerd $out/bin/
|
2019-07-30 06:10:02 +01:00
|
|
|
wrapProgram $out/bin/racerd --set-default RUST_SRC_PATH "$RUST_SRC_PATH"
|
2016-03-20 07:29:47 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-08-10 18:45:49 +01:00
|
|
|
broken = true;
|
2016-03-20 07:29:47 +00:00
|
|
|
description = "JSON/HTTP Server based on racer for adding Rust support to editors and IDEs";
|
2020-03-09 03:32:15 +00:00
|
|
|
homepage = "https://github.com/jwilm/racerd";
|
2016-03-20 07:29:47 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|